A blazing-fast cross-platform tool for clearing storage space, written in Rust.
Works on macOS, Linux, and Windows. Available as CLI and GUI (desktop app).
# Install (macOS)
brew tap phpfc/cleanser && brew install cleanser
# Or with cargo
cargo install --git https://github.com/phpfc/cleanser.git
# Scan your system
cleanser scan
# Preview what would be deleted
cleanser clean --dry-run
# Clean safe items
cleanser clean --risk safecleanser scan # Normal scan
cleanser scan --speed quick # Fast scan (depth 3)
cleanser scan --speed thorough # Deep scan (unlimited)
cleanser scan --interactive # Visual TUI browser
cleanser scan --paths ~/Projects # Scan specific paths
cleanser scan --min-size 500 # Find files > 500MB
cleanser scan --older-than 90d # Files not modified in 90 days
cleanser scan --find-duplicates # Find duplicate files
cleanser scan --json # JSON outputcleanser clean # Clean safe items (uses cache)
cleanser clean --risk moderate # Include build artifacts
cleanser clean --risk risky # Include large files
cleanser clean --dry-run # Preview only
cleanser clean --force-scan # Bypass cache
cleanser clean --interactive # Review files one by one
cleanser clean -y # Skip confirmationCleanser builds an intelligent map of your filesystem for faster repeated scans.
cleanser map show # View mapped directories
cleanser map stats # Detailed breakdown by category
cleanser map rebuild # Force rebuild the map
cleanser map clear # Delete the mapcleanser whitelist add ~/important # Never scan this path
cleanser whitelist remove ~/old # Remove from whitelist
cleanser whitelist list # Show all whitelisted pathscleanser cache show # View cached scan results
cleanser cache clear # Clear the cache| Risk Level | What's Included |
|---|---|
| Safe | System caches, browser caches, package manager caches (npm, pip, cargo), logs, __pycache__, temp files |
| Moderate | node_modules, target/ (Rust), build/, dist/, .gradle, .next, .nuxt |
| Risky | Large files (> 100MB), duplicate files |
Build directories are validated against project files (e.g., target/ only if Cargo.toml exists).
| Platform | Cache Locations |
|---|---|
| macOS | ~/Library/Caches, ~/.cache, ~/Library/Logs |
| Linux | ~/.cache, XDG paths, /var/log |
| Windows | %LOCALAPPDATA%, %TEMP% |
Homebrew (macOS):
brew tap phpfc/cleanser && brew install cleanserCargo:
cargo install --git https://github.com/phpfc/cleanser.gitFrom source:
git clone https://github.com/phpfc/cleanser.git
cd cleanser
cargo build --release
sudo cp target/release/cleanser /usr/local/bin/Cleanser is organized as a Cargo workspace with three crates:
crates/
├── cleanser-core/ # Core library - scanning, cleaning, mapping logic
├── cleanser-cli/ # Command-line interface with TUI support
└── cleanser-gui/ # Desktop GUI (Tauri + React/TypeScript)
| Crate | Description |
|---|---|
cleanser-core |
Shared library with platform-agnostic cleanup logic |
cleanser-cli |
Terminal interface with interactive TUI mode |
cleanser-gui |
Cross-platform desktop app built with Tauri |
CLI only:
cargo build --release -p cleanser-cliGUI (requires Node.js):
cd crates/cleanser-gui/ui && npm install && cd ..
cargo tauri buildSetup git hooks:
# Install pre-push hooks to run linting and tests automatically
./scripts/install-git-hooks.shThe pre-push hook will automatically run:
cargo fmt --all -- --check(formatting)cargo clippy --workspace --exclude cleanser-gui --all-targets -- -D warnings(linting)cargo test --workspace --exclude cleanser-gui --verbose(tests)
To skip the hook (not recommended): git push --no-verify
- Always preview with
--dry-runfirst - Start with
--risk safe - Use
whitelist addto protect important directories - Build directories are validated against project files
This tool permanently deletes files. Use at your own risk.
MIT