OptiClear

Developer Tools

How to Completely Uninstall Homebrew on Mac

To uninstall Homebrew completely, use the official uninstall script found in its install repository. Dragging components to the Trash will not remove all associated data or background items.

Last updated: 3 min read

Remove Homebrew and everything it leaves behind

Homebrew data usually takes 1 GB – 20 GB on a Mac. The free scan shows the exact size on your Mac before you change anything.

Scan your Mac free

Free scan · No account · Nothing is deleted without your OK · Moves to the Trash first · macOS 14+

Application
Homebrew
Typical data size
1 GB – 20 GB
Category
Developer Tools
File Location
~/Library/Caches/Homebrew

Homebrew has its own uninstaller

  1. Quit the app completely (⌘+Q in the menu bar).
  2. Homebrew has an official uninstall script published in its install repository.
  3. Remove the folders Homebrew left behind, listed in the table below.
  4. Empty the Trash to free up the space.

Everything Homebrew keeps on your Mac

4 locations. Tick each one as you remove it; back up anything marked as your data first.

Locations are the standard macOS folders Homebrew uses; some appear only after you use the matching feature.

What Homebrew leaves behind

Specific to Homebrew

Manual deletion fails to remove launch agents added to system folders for background services. It also leaves behind cached bottles and source archives in the library, though these are rebuilt automatically. User data for services like PostgreSQL resides within the app prefix and remains until that specific directory is deleted.

Background items
brew services adds launch agents to ~/Library/LaunchAgents for services such as databases.
License
Homebrew is free and open source.

Preparing to remove Homebrew

Before removal, ensure all active services are stopped. Export a list of your installed packages or create a Brewfile to keep a record of your environment. Because some tools store data in /opt/homebrew, failing to back up databases will result in permanent loss when the prefix is deleted.

0 of 4 done

By hand or with OptiClear

By handWith OptiClear
Places to check4 folders, one by oneOne scan
File sizesYou look them up yourselfShown for every item
Removing the wrong thingEasy to delete the wrong folderGoes to the Trash first, so it can be restored
CostFreeScan is free; cleaning needs Pro (yearly plan has a 7-day free trial)

See it working

OptiClear — Scan overview — every category on one screen
Scan overview — every category on one screen
OptiClear — Privacy audit: what each app has been allowed to reach
Privacy audit: what each app has been allowed to reach
OptiClear — Large and aging files, ranked by what they cost you
Large and aging files, ranked by what they cost you

Try it without risk

  1. Download and scan for freeSee every Homebrew file and its size. No account needed.
  2. Clean free for 7 daysStart the 7-day free trial of the yearly plan inside the app.
  3. Keep it or cancelCancel in your App Store settings at least 24 hours before the trial ends and you won't be charged.
Download free and scan

After the free trial, Pro costs $39.99 per year in your country's App Store; cancel any time.

Frequently asked questions

Not all of them. Folders marked “Back up first: your data” hold your own Homebrew data: back them up before removing them. Folders marked “Yes, rebuilt automatically” are rebuilt automatically; removing them only makes the next start slower. Items marked “Yes, once the app is gone” only matter while Homebrew is installed, so remove them after the app.
Does brew cleanup uninstall the app?
No, it only removes old versions and cached downloads without uninstalling any package.
How much space can the app occupy?
Its data typically ranges from 1 GB – 20 GB.

Related cleanup guides