Your Mac Is Full of Build Junk: A Free Tool That Cleans Xcode, Docker, npm and Homebrew Caches
Disclosure: One of the tools I recommend below — Mac Disk Cleaner (DiskBee Cleaner) — is developed by my team. Everything else is independent third-party software. All claims are based on actually installing and using each tool; I've listed what's free, what's safe, and what each one is good (and not good) at so you can decide for yourself.
If you're a developer on macOS, your disk is quietly filling up with stuff you'll never look at again:
- Xcode
DerivedDataand old simulator runtimes (tens of GB) - Docker images, layers, and the build cache
-
npm/pnpm/yarnglobal caches - Homebrew downloads and old versions
- Gradle, CocoaPods, and Rust build artifacts
- Browser caches from a dozen dev profiles
macOS's built-in Storage → System Data sees the bloat but can't clean it. The Finder can't find it because it's buried in ~/Library. And du -sh * only tells you how big a folder is — it doesn't safely remove the right things.
Here's how I actually reclaim space, ranked by usefulness.
1. Mac Disk Cleaner (DiskBee Cleaner) — best all-in-one, and genuinely free
ntfs.pro/en/cleanup · v1.7.3 · macOS 14+ · 5.1 MB · free
I'll lead with this one because it's the one I keep coming back to, for three reasons:
Cleaned items go to Trash first — recoverable. Most cleaners delete permanently. Here, everything you select is moved to Trash, so if something breaks you restore it. Empty Trash only when you're sure. For a tool that touches ~/Library, that's a big deal.
It's actually free — no "scan free, pay to clean" trap. No ads, no subscription, no in-app purchases, no upgrade nag. Scan, clean, and the app uninstaller are all free.
It understands developer caches. Beyond system logs, Trash, and browser caches (Chrome, Safari, Edge, Firefox, Arc, Opera, Vivaldi…), it has a dedicated developer-tools section:
- Xcode
DerivedData, device support, and old simulators - IDE data for VS Code, Cursor, Trae, and others
- Docker images/layers/build cache
- Homebrew cache and old versions
-
npm,pnpm,yarn,uvcaches - CocoaPods, Gradle, Rust, Maven artifacts
On my machine, Xcode + Docker alone freed ~30 GB that the system Settings couldn't touch.
It also bundles an app uninstaller: pick an app and it removes the scattered cache/preferences/support files along with it (shared files are kept by default) — cleaner than dragging to Trash.
Privacy: scanning is local-only; filenames and paths are never uploaded. Anonymous telemetry is opt-out. The binary is Apple-notarized.
Best for: anyone who wants one free, safe tool that covers system, browser, and developer caches — plus app uninstalling.
2. The manual du + GrandPerspective combo — find the big stuff first
Before cleaning anything, I like to see where the space went. Two free tools:
- GrandPerspective — block-map visualization of folder sizes; instantly spots that 40 GB
node_modulesor old DMG. - Disk Inventory X — treemap equivalent.
Neither cleans automatically; you locate the offender and delete it yourself. Pair them with a cleaner: visualize first, then bulk-clean caches.
3. AppCleaner — uninstall apps cleanly (and only that)
Drop an app in, it finds the associated cache/preference/residual files, you check and delete. It does uninstalling and does it well — lightweight, no ads. But it won't clear browser/dev/system caches or find big files. Use it for uninstalls only.
4. brew cleanup and docker system prune — know your CLI tools
You don't always need a GUI:
brew cleanup --prune=all docker system prune -a --volumes # careful: removes unused images & volumes npm cache clean --force # usually not needed; npm self-heals xcrun simctl delete unavailable # removes old simulators These work, but they're scattershot — docker system prune -a nukes all unused images, which can be more than you wanted. A GUI cleaner with Trash staging is safer when you're unsure.
5. OnyX and CCleaner — use with caution
- OnyX — powerful system maintenance, but you must download the build matching your exact macOS version; the wrong one can cause issues. For experienced users.
- CCleaner — free tier clears browser caches/logs, but heavy upgrade popups and a history of security concerns on the Windows side.
My routine
- GrandPerspective to see what's huge (often old installers, videos, Docker).
- Mac Disk Cleaner for system/browser/developer caches and app residual — staged in Trash, safe.
- AppCleaner for apps I no longer use.
- CLI (
brew cleanup,xcrun simctl) for anything specific.
The thing that matters most with a cleaner isn't how much it claims to free — it's whether you can undo a mistake and whether it's actually free to use (not just free to scan). A tool that stages everything in Trash and doesn't gate the clean behind a paywall removes the two scariest parts of disk maintenance.
Personal experience only — always review what you're deleting and back up important data first.