__ __ ____ _
| \/ | __ _ ___ / ___| | | ___ __ _ _ __ ___
| |\/| | / _` | / __| | | | | / _ \ / _` | | '_ \ / __|
| | | | | (_| | | (__ | |___ | | | __/ | (_| | | | | | \__ \
|_| |_| \__,_| \___| \____| |_| \___| \__,_| |_| |_| |___/
Free 10-50GB on your Mac with one command.
# Install via Homebrew (recommended)
brew install carme99/tap/mac-cleans
# Or install via curl
curl -fsSL https://raw.githubusercontent.com/Carme99/MacCleans.sh/main/installer.sh | bash
# Preview what would be cleaned
sudo Mac-Clean --dry-run
# Clean everything (non-interactive)
sudo Mac-Clean --yes| Category | Typical Size | Notes |
|---|---|---|
| Xcode Derived Data | 5-50GB | Rebuilds automatically |
| Docker | 1-20GB | Containers + images |
| Homebrew Cache | 1-5GB | Cached downloads |
| npm / Yarn / pnpm | 500MB-5GB | Node.js development |
| pip Cache | 100MB-2GB | Python development |
| Browser Caches | 1-5GB | Chrome, Firefox, Edge |
| iOS Simulator | 1-10GB | Slow rebuild |
| Time Machine | 10-100GB | Local snapshots |
| Trash | Variable | Permanent deletion |
| Browser Testing Tool Caches | 500MB-2GB | Re-downloaded on next test |
| Crash Reports | 100MB-1GB | Old crash dumps (>7 days) |
| User Tool Caches | 500MB-2GB | ~/.cache/ redownloads on demand |
| +20 more | See all categories |
| Safe by design | 32 categories | Interactive mode |
| Profile presets | JSON output | CI/CD ready |
brew install carme99/tap/mac-cleanscurl -fsSL https://raw.githubusercontent.com/Carme99/MacCleans.sh/main/installer.sh | bashgit clone https://github.com/Carme99/MacCleans.sh.git
cd MacCleans.sh
chmod +x clean-mac-space.sh
sudo ./clean-mac-space.sh --dry-run| Use Case | Command |
|---|---|
| Preview | sudo Mac-Clean --dry-run |
| Clean all | sudo Mac-Clean --yes |
| Skip all confirmations | sudo Mac-Clean --force |
| Interactive | sudo Mac-Clean --interactive |
| Developer preset | sudo Mac-Clean --profile developer |
| Skip specific | sudo Mac-Clean --skip-xcode |
| Threshold | sudo Mac-Clean --threshold 80 |
| JSON output | sudo Mac-Clean --json |
Full docs at docs/README.md. Quick links:
| I want to... | Guide |
|---|---|
| Run it for the first time | tutorials/getting-started.md |
| See a one-screen walkthrough | tutorials/first-cleanup.md |
| Install | how-to/install.md |
| Configure skip flags | how-to/configure.md |
| Find a specific flag | reference/commands.md |
| See what each category cleans | reference/categories.md |
| Understand the architecture | explanation/how-it-works.md |
| Got an error? | how-to/troubleshooting.md |
| Add a new cleanup category | contributing/adding-a-category.md |
$ sudo Mac-Clean --dry-run
[!] Disk usage: 85% - scanning...
[✓] Xcode Derived Data: 12.3 GB
[✓] Homebrew Cache: 2.1 GB
[✓] Docker: 8.5 GB
[✓] npm/Yarn Cache: 1.2 GB
[⚡] Would reclaim: ~23 GBBuilt for fun and learning. No subscriptions, no cloud, no telemetry.
Why? Because my MacBook Air had 256GB and CleanMyMac wanted £25/year for the privilege of cleaning up after myself.
This script does one thing: it frees up disk space by removing safe-to-delete cache and temporary files. Everything is open source, auditable, and runs 100% locally on your machine.
MIT - Free, open source, and transparent.