π§Ή Clean development artifacts on macOS - free up disk space fast!
Mac Dev Cleaner is a CLI tool that helps developers reclaim disk space by removing:
- Xcode - DerivedData, Archives, Caches
- Android - Gradle caches, SDK caches
- Node.js - node_modules, npm/yarn/pnpm/bun caches
brew tap thanhdevapp/tools
brew install dev-cleanergit clone https://github.com/thanhdevapp/dev-cleaner.git
cd dev-cleaner
go build -o dev-cleaner .
sudo mv dev-cleaner /usr/local/bin/# Scan all categories
dev-cleaner scan
# Scan specific category
dev-cleaner scan --ios
dev-cleaner scan --android
dev-cleaner scan --nodeExample Output:
π Scanning for development artifacts...
ββββββββββββββββββββββββββββββββββββββββββββββββββ
[1] android 9.0 GB Android System Images
[2] xcode 7.4 GB Xcode DerivedData
[3] android 5.4 GB Gradle Caches
[4] xcode 3.9 GB DerivedData/Runner-xxx
[5] node 1.8 GB npm Cache
...
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Total: 14 items, 31.4 GB
# Interactive clean (dry-run by default)
dev-cleaner clean
# Actually delete files
dev-cleaner clean --confirm
# Clean specific category
dev-cleaner clean --ios --confirm- β Dry-run by default - preview before deleting
- β
Confirmation required - must type
yesto delete - β Path validation - never touches system files
- β
Logging - all actions logged to
~/.dev-cleaner.log
~/Library/Developer/Xcode/DerivedData/~/Library/Developer/Xcode/Archives/~/Library/Caches/com.apple.dt.Xcode/~/Library/Developer/CoreSimulator/Caches/~/Library/Caches/CocoaPods/
~/.gradle/caches/~/.gradle/wrapper/~/.android/cache/~/Library/Android/sdk/system-images/
*/node_modules/(in common project directories)~/.npm/~/.pnpm-store/~/.yarn/cache/~/.bun/install/cache/
# Build
go build -o dev-cleaner .
# Run tests
go test ./...
# Run locally
./dev-cleaner scan- MVP: Scan and clean commands
- TUI with interactive selection (BubbleTea)
- Config file support (
.dev-cleaner.yaml) - Homebrew distribution
- Progress bars with ETA
- Python -
__pycache__,.pytest_cache,.mypy_cache, pip cache - Ruby - gem cache, bundler cache
- Rust -
target/folders, cargo cache - Go - go build cache, go mod cache
- Docker - unused images, containers, volumes
- Swift Package Manager - SPM cache
- Maven -
~/.m2/repository - Homebrew - brew cache
- Statistics & History - Track cleaned space over time
dev-cleaner stats- View cleaning historydev-cleaner history- Show past operationsdev-cleaner top- Top 10 space consumers
- Smart Detection - Intelligent recommendations
- Detect unused projects (>6 months inactive)
- Auto-suggest cleaning when disk space is low
- Warning when disk < 10GB free
- Exclude/Whitelist System
- Path exclusion rules
- Age-based cleaning policies
- Project importance tagging
- Scheduled Cleaning
dev-cleaner schedule weekly- Cron-style scheduling
- Background daemon mode
- Backup & Restore
- Compress before delete option
- Restore point creation
- Undo last clean operation
- Analysis Tools
dev-cleaner analyze- Deep disk usage analysis- Project activity detection
- Smart recommendations
- Multi-machine Sync - Sync settings across Macs
- Web Dashboard - Browser-based UI for management
- CI/CD Integration - Clean build artifacts on runners
- Notification system (macOS native)
- Export/Import configurations
- Interactive file browser with preview
- Real-time speed indicators (MB/s)
- Cloud backup integration
MIT License - see LICENSE for details.