How to uninstall Homebrew completely

Researched, not yet tested: read from Homebrew's uninstall.sh (Homebrew/install, 27 November 2026) and docs.brew.sh; we didn't run it on a Mac. Check the commands against your setup.

Homebrew has an official uninstall script. Save a list of your packages first, then run it:

brew bundle dump --file ~/Brewfile
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

The script lists everything it will remove and asks Are you sure you want to uninstall Homebrew? This will remove your installed packages! [y/N]. Type y to go ahead. When it finishes it prints Homebrew uninstalled! and any leftover files you may want to delete yourself.

We haven’t run the uninstaller on a Mac. The prompts, options and leftovers below come from reading uninstall.sh in the Homebrew/install repository (last changed 27 November 2026), its README and the Homebrew FAQ, which points to the same script.

Before you uninstall: save your package list

brew bundle dump writes a Brewfile listing your installed formulae, casks and taps. Homebrew’s Brewfile documentation describes it as Homebrew’s installed-state snapshot command. Keep the file somewhere outside Homebrew’s folders:

brew bundle dump --file ~/Brewfile

If you reinstall Homebrew later, brew bundle --file ~/Brewfile installs everything on the list again.

Preview what will be removed

Download the script and run it with --dry-run to see the list without deleting anything:

curl -fsSLO https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh
/bin/bash uninstall.sh --dry-run

In a dry run the script’s heading says “This script would remove:” instead of “will remove”. The script’s options, from its --help text:

Option What it does
-n, --dry-run Show what would be removed and change nothing
-p, --path=PATH Uninstall Homebrew from this prefix instead of the default
--skip-cache-and-logs Keep Homebrew’s download cache and logs
-f, --force Don’t ask for confirmation
-q, --quiet Print nothing
NONINTERACTIVE=1 Same as --force, for scripts

Uninstall from a specific location

The script looks for Homebrew in the default place for your machine. In the script these are /opt/homebrew on Apple Silicon, /usr/local on Intel Macs and /home/linuxbrew/.linuxbrew on Linux. To remove a copy somewhere else, such as an Intel Homebrew left on an Apple Silicon Mac after a migration, pass the path:

/bin/bash uninstall.sh --path /usr/local

What the script removes and leaves

It removes Homebrew’s repository, the Cellar with your installed formulae, the links in bin and other folders, and by default Homebrew’s caches and logs (~/Library/Caches/Homebrew and ~/Library/Logs/Homebrew on a Mac). In Applications it only targets items that link into Homebrew’s Cellar.

When files remain, it prints The following possible Homebrew files were not deleted: with a list and You may wish to remove them yourself. On Intel Macs, /usr/local itself is never deleted, because other software uses it too. Check each listed path before you delete it.

If some steps needed admin rights, it prints Homebrew partially uninstalled (but there were steps that failed)! and tells you to rerun the script with sudo.

Clean up your shell profile

The uninstaller doesn’t edit your shell files. Remove the line that loads Homebrew, usually in ~/.zprofile:

eval "$(/opt/homebrew/bin/brew shellenv)"

Then open a new terminal. If you remove the files but leave this line, every new terminal prints an error because /opt/homebrew/bin/brew no longer exists.

Remove one package, not all of Homebrew

If one package is the problem, uninstall just that:

brew uninstall <formula>
brew uninstall --cask <app>
brew autoremove

And if Homebrew is misbehaving rather than unwanted, run brew doctor first. Most of its warnings come with a fix that’s quicker than reinstalling. To set it up again afterwards, follow the Homebrew install guide.

FAQ

Does uninstalling Homebrew remove the apps and tools I installed with it?

It removes every formula (command-line tool) it installed, along with Homebrew's own files. The script asks you to confirm because "This will remove your installed packages!" From our reading of the script, apps that casks copied into /Applications aren't on its list unless they link into Homebrew's Cellar, so check that folder afterwards.

How do I uninstall a single Homebrew package instead?

Run brew uninstall <name> for a formula or brew uninstall --cask <name> for an app. brew autoremove then removes dependencies nothing else needs. You don't need the full uninstaller for that.

How do I remove Intel Homebrew from an Apple Silicon Mac?

Download the uninstall script and run it with --path /usr/local, as Homebrew's install README shows for migrating from Intel to Apple Silicon. That leaves the native Homebrew in /opt/homebrew alone.

Can I reinstall Homebrew after uninstalling?

Yes. Run the install command from brew.sh again, add the brew shellenv line it prints to your profile, then restore your packages with brew bundle --file pointing at the Brewfile you saved.