Command line and power tools
Homebrew keeps every downloaded bottle and, by default, old versions of upgraded formulae. On a machine that has run brew upgrade for a couple of years, that is real space.
brew cleanup -s
brew autoremove
du -sh ~/Library/Caches/Homebrew
cleanup -s removes old versions of installed formulae and scrubs the download cache, including bottles for things you still have. autoremove uninstalls dependencies nothing depends on any more — orphans left behind when you uninstalled the thing that needed them.
brew cleanup -s --dry-run
lists every file it would delete with sizes. It is worth one look the first time; after that, most people run it on trust.
~/Library/Caches/Homebrew holds downloaded bottles. cleanup -s empties most of it, but the folder is worth knowing because it is in ~/Library — outside Spotlight's index — so it never appears when you look for what is using the disk.
brew autoupdate start --cleanup
or simply run brew cleanup after each brew upgrade. Homebrew also cleans individual formulae automatically 30 days after install, but the full sweep with -s is what actually returns the gigabytes.
Yes. It removes only old versions and cached downloads. Anything deleted can be re-downloaded, and current versions are untouched.
Every install and upgrade downloads a bottle, and the cache is only trimmed when cleanup runs. Years of upgrades accumulate quietly.
Everywhere keeps track of every file on your Mac, including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised