A CLI tool to clean Mac system temporary and cache files.
- 🔍 List - View all cache/temp files and their sizes
- 🧹 Clean - Remove cache files with optional confirmation
- 👀 Dry Run - Preview what will be deleted without actually removing
- 📂 Categories - Organize caches by type (system, user, dev, browser)
- ⚙️ Configurable - Customize cache directories via config file
cargo install kleengit clone https://github.com/ark930/kleen.git
cd kleen
cargo install --path .# List all caches
kleen list
# List with detailed file information
kleen list --verbose
# List only specific category
kleen list --category dev# Clean all caches (with confirmation)
kleen clean
# Clean without confirmation
kleen clean --force
# Clean only specific category
kleen clean --category browser# Preview what will be deleted
kleen dry-run
# Preview specific category
kleen dry-run --category userkleen categories# Show config file path
kleen config path
# Generate default config file
kleen config init| Category | Description |
|---|---|
system |
System temp files (/tmp, /private/var/folders) |
user |
User caches, logs, and Trash |
dev |
Developer tool caches (Xcode, Cargo, npm, pip, etc.) |
browser |
Browser caches (Chrome, Safari, Firefox, Edge) |
all |
All categories (default) |
The config file is located at ~/Library/Application Support/kleen/config.toml.
Run kleen config init to generate a default config file, then customize it as needed.
Example config entry:
[[dev]]
name = "Cargo Registry Cache"
path = "~/.cargo/registry/cache"
category = "dev"
description = "Rust Cargo package cache"- System temp files (
/private/var/folders) - Temp directory (
/tmp)
- User caches (
~/Library/Caches) - User logs (
~/Library/Logs) - Trash (
~/.Trash)
- Xcode DerivedData & Archives
- Cargo (Rust)
- npm / yarn / pnpm (Node.js)
- pip (Python)
- Gradle / Maven (Java)
- Go modules
- CocoaPods
- VS Code / Cursor / JetBrains IDEs
- Google Chrome
- Safari
- Firefox
- Microsoft Edge
This project is licensed under the MIT License - see the LICENSE file for details.