Homebrew storage on a Mac: measure Cellar, Caskroom and cache, then clean them safely
Homebrew can use 20 GB without one giant file. Formula versions sit in Cellar, cask staging files sit in Caskroom, and downloaded bottles and app installers sit in a separate cache. Measure all three before deleting anything.
The safe five-minute version
Do not hard-code /opt/homebrew or /usr/local. Apple silicon normally uses /opt/homebrew; Intel normally uses /usr/local; the brew --... commands also handle a custom installation.
What each folder holds
| Place | What is in it | Safe first move |
|---|---|---|
| Cellar | Versioned formula packages and their dependencies | brew cleanup --dry-run |
| Caskroom | Versioned cask staging directories; many apps themselves live in Applications | Uninstall an unused cask with brew uninstall --cask name |
| Cache | Downloaded bottles, source archives and cask installers | brew cleanup, or prune more aggressively after previewing |
| Taps | Package definitions; usually small | brew untap owner/repo only when no installed package needs it |
Find the packages taking the space
Read the last lines first. A large formula may be required by several smaller ones, so check before removing it: brew uses --installed package-name.
A worked 24 GB example
| Measured place | Before | After cleanup | Recovered |
|---|---|---|---|
| Cellar | 13.0 GB | 9.5 GB | 3.5 GB |
| Caskroom | 4.0 GB | 2.5 GB | 1.5 GB |
| Cache | 7.0 GB | 0.8 GB | 6.2 GB |
| Total | 24.0 GB | 12.8 GB | 11.2 GB |
This is a worked example, not a reading from your Mac. The arithmetic is 24.0 - 12.8 = 11.2 GB recovered, or 4.4% of a 256 GB SSD. Put your own du results into the same table.
Choose how far to clean
- Normal:
brew cleanupremoves old formula versions, stale locks and downloads older than Homebrew's cleanup age. Current documentation says the default age is 120 days. - All old cache files: preview
brew cleanup --prune=all --dry-run, then run it without--dry-run. You may need to download installers again later. - One package:
brew cleanup package-name. - Unused dependencies: inspect
brew autoremove --dry-run, then runbrew autoremove. - Package you no longer use:
brew uninstall nameorbrew uninstall --cask name, then run cleanup.
Don't do these
- Do not run
sudo brew .... Homebrew warns that this gives package code root access. - Do not delete Cellar folders by hand. Homebrew tracks links and dependencies; use
brew uninstallandbrew cleanup. - Do not assume Caskroom is the whole app size. A cask may place the actual app in
/Applications. - Do not use
brew uninstall --cask --zapjust for disk space unless you have checked what its zap stanza removes; it can remove settings and user data.
Check the result
If Homebrew is small, look elsewhere instead of cleaning harder. Developers often recover more from Xcode and Simulator storage, while a large System Data number may be purgeable space and local snapshots.
Zofle shows your Mac storage by category so you can compare Homebrew with developer files, caches and downloads before removing anything.
Download Zofle for MacSources and method
- Homebrew brew manpage:
--cellar,--caskroom,--cache, package sizes, cleanup dry-run, 120-day default and prune options. - Homebrew FAQ: default prefixes are
/opt/homebrewon Apple silicon and/usr/localon Intel; do not run brew with sudo. - Sources checked 10 November 2026. The 24 GB table is labelled worked arithmetic, not a machine measurement.
Zofle Pro news
People signing up now will get Zofle Pro, with more features, for free when we launch it.