Homebrew is the cleanest package manager most people never clean. Every brew upgrade leaves the old keg behind, every install caches its download, and garbage collection is opt-in. On a developer Mac, brew --cache alone regularly holds 2-8 GB.
brew cleanup -s # remove old versions + stale downloads (the big one)
brew cleanup --prune=all # also clear downloads newer than the default 120d grace
brew autoremove # remove orphaned dependencies nobody needs
Run brew cleanup -n first for a dry-run list of everything that would go. Typical reclaim on a machine with a year of usage: 3-10 GB.
| Leftover | Where | Manual? |
|---|---|---|
| Global npm/npx cache | ~/.npm | Yes — see our npm guide |
| Python wheels | ~/Library/Caches/pip | Yes |
| Cask app leftovers | ~/Library/… | Yes — uninstall checklist |
| Old Launch Agents | ~/Library/LaunchAgents | Review manually |
One launchd timer a week is enough. Or fold it into a broader sweep — our package-manager cache guide has a combined script. If you would rather never think about it, MacCleaner PRO schedules cache sweeps including brew paths.
If /opt/homebrew (Apple silicon) or /usr/local (Intel) exceeds 15-20 GB, the issue is usually duplicated language runtimes installed by formulae. Audit with brew list --formula | wc -l and brew deps --installed --tree | less; uninstall the runtimes you did not consciously choose.
Brew is one layer of the developer-cache stack — the full picture is in System Data explained and the cleanup hub. To see everything at a glance, the disk waste estimator above estimates your total in ten seconds.