How to Clean Up Homebrew and Free Space on a Mac
Homebrew accumulates old package versions and cached downloads over time. Reclaim the space with brew cleanup -s (removes old versions and clears the download cache) and by clearing ~/Library/Caches/Homebrew. It's all re-downloadable, so it's safe — on an active developer Mac this is often several gigabytes.
Why Homebrew grows
Every brew upgrade leaves the old version behind, and every install caches its download. Over months that quietly becomes gigabytes you never see. It's the same rebuildable-junk story as node_modules and npm — safe to clear because everything re-downloads.
The cleanup commands
brew cleanup -s— removes old versions and clears the download cache (the big win).brew cleanup --prune=all— also clears everything in the cache.- Check first:
brew cleanup -nshows what would be removed without deleting. - Manual cache:
rm -rf ~/Library/Caches/Homebrew/*
The guided sweep
On a dev Mac, Homebrew rarely travels alone. MacCleaner surfaces the Homebrew cache alongside Xcode, Docker, Python caches and local AI models, with real sizes — so you reclaim the whole developer pile in one pass, recoverable until you empty.
Frequently asked questions
Is brew cleanup safe?
Yes. It removes old package versions and cached downloads, all of which re-download on demand. Run brew cleanup -n first to preview what will be removed.
How much space does Homebrew use?
On an active developer Mac, the old versions and download cache are often several gigabytes. brew cleanup -s reclaims most of it.
Where does Homebrew store its cache?
Downloads are cached in ~/Library/Caches/Homebrew. brew cleanup clears it, or you can delete the folder's contents manually.
Reclaim the space in two taps
MacCleaner scans read-only, shows every file before anything is touched, marks the safe groups, and lets you choose Trash or permanent. Free for up to 500 MB of cleanup a day.
Download for Mac