Guide

How to uninstall Homebrew and its packages on Mac

To uninstall Homebrew, save an inventory and back up data from its tools, then use the uninstall script linked by Homebrew’s own FAQ. If you only want free space, preview brew cleanup first; it removes old downloads and versions without removing Homebrew itself.

By · Updated · 6 min read · For Macs with Apple silicon running macOS 15 or later

Before uninstalling Homebrew

Homebrew manages command-line packages, graphical apps called casks, and sometimes services. Removing the package manager is broader than deleting one app. A database, project or automation can depend on its installed tools even if you rarely open Terminal.

First back up your Mac and the application data you need. A list of package names helps reproduce an environment, but it does not include database contents, private keys, edited configuration or local project files. If this Mac is used for work or school, ask IT before changing a shared development environment.

The steps below apply to Homebrew on macOS 15 Sequoia, macOS 26 Tahoe and macOS 27. The relevant commands follow Homebrew’s version and configuration, rather than the Finder interface.

List what Homebrew installed

Run the following inventory commands before removal. They do not uninstall packages, need no sudo and require no undo. Save the results somewhere outside the Homebrew prefix.

brew list --formula
brew list --cask
brew --prefix
brew services list

The first list shows command-line formulae; the second shows casks. The prefix identifies this installation’s root. The services list helps you recognize managed background jobs that need their own backup and shutdown plan. Read the output rather than assuming the installation contains only packages you explicitly remember installing; dependencies appear too.

On the Mac used for this guide, macOS 27.0.1 on 23 October 2026, the prefix command returned /opt/homebrew. That is Homebrew’s documented default for Apple silicon. An Intel or migrated installation can differ, and an Apple silicon Mac can have an additional Intel installation for a specific workflow.

Do not delete /usr/local or another prefix as a shortcut. Other installers can place files there, and a root directory is not a trustworthy inventory of ownership. Use the package manager’s documented procedure for the installation you actually selected.

Need space rather than removal? Preview cleanup

Homebrew documents a dry-run mode that previews cleanup:

brew cleanup --dry-run

It needs no sudo and is intended to report cleanup candidates without deleting them. We did not run cleanup on this Mac while preparing the guide; consult your own output to see what is eligible. Cleanup is different from an upgrade and different from uninstalling a package.

The next command removes eligible old package versions and cached downloads. You may need to download them again, and there is no automatic undo. Review the preview before proceeding, especially if you rely on a particular old version.

brew cleanup

Run it as your ordinary user, without sudo. It leaves Homebrew installed. It does not turn a database’s live data into disposable cache or clean every app installed through a cask. The Homebrew manual is the authority for cleanup options in your version.

Handle casks and services before the package manager

For a graphical app with a vendor uninstaller, use that uninstaller while the app is still present. VPNs and security apps can have components outside the Homebrew prefix. A cask record does not mean that deleting Homebrew’s directory removes all of the vendor’s installation safely.

Homebrew also offers package and cask uninstall commands, but do not use a bulk “zap everything” recipe. Zap operations may remove user data and preferences shared with related apps. Decide app by app which data should survive, and follow the vendor’s removal instructions where they apply.

For services, identify what each does and back up its data using that program’s documented export or backup method. Stop it using its documented service procedure before removing its tools. Do not stop every service as a generic experiment on a work Mac. Restoring an executable later may not restore the data it used.

Use Homebrew’s official uninstall script

Homebrew’s FAQ links the uninstall script in Homebrew/install. Open that repository page and read the current script and usage. Avoid an old copied download address or a script supplied by an unrelated cleaner.

If you save the official script as uninstall.sh in Downloads, its documented dry-run option is:

/bin/bash ~/Downloads/uninstall.sh --dry-run

The path assumes that exact filename and location; verify it in Finder first. The script’s dry run previews the selected removal and does not need a sudo prefix. Read any requests or errors instead of overriding them. We did not execute the uninstall script, even in dry-run mode, to prepare this article.

The following operation removes the selected Homebrew installation and managed contents described by the script. Back up required data and save your package inventory first. There is no single undo command; reinstalling tools is separate from restoring their data.

/bin/bash ~/Downloads/uninstall.sh

Use the script’s prompts, including administrator authorization if it requests it for the detected installation. Do not add a blanket sudo wrapper. For a non-default or second installation, follow the script’s current options rather than assuming it selected the one you meant.

Review what remains

Read the script’s completion output. It may report files or directories left for manual consideration. Identify those individually; do not remove a shared parent folder to silence a warning. Keep data whose owner or purpose is uncertain.

Review your shell startup configuration for Homebrew initialization lines you intentionally added. Back up the file before editing, remove only the obsolete line for the removed installation, and open a fresh Terminal window afterwards. Do not delete the entire shell configuration: it can contain unrelated paths, aliases and project settings.

Apple’s Command Line Tools are a separate installation. Keeping them can still be useful without Homebrew. The Xcode and developer storage guide explains that distinction. For updating packages instead of removing them, use the app updates guide.

How Tend helps

Tend’s free Updates list brings Homebrew updates together with other app and macOS updates. That can answer whether an installed tool needs maintenance before you decide to remove it. It is not a Homebrew environment export or uninstall manager.

Free storage views show eligible developer files in your home folder; Pro moves selected items to the macOS Trash. They do not replace the official Homebrew script or remove the package manager’s shared prefix for you.

Questions

How do I uninstall Homebrew on Apple silicon?

Back up required data, list installed formulae, casks and services, then use the uninstall script linked from Homebrew’s FAQ. Check that it targets the intended installation, usually under /opt/homebrew on Apple silicon.

Does brew cleanup uninstall Homebrew?

No. It removes eligible old versions and cached downloads while leaving Homebrew installed. Preview with brew cleanup --dry-run and review the output first.

Will uninstalling Homebrew remove all cask apps?

Do not assume it completes every vendor’s uninstall. Some apps install helpers, extensions or data elsewhere. Use their official uninstall procedures before removing the package manager.

Do I need to remove Command Line Tools too?

No. They are a separate installation and other development tools may still need them. Review that decision independently.

Sources

  • Homebrew, FAQ, including the official uninstall link and Apple silicon prefix.
  • Homebrew, brew manual, list, services, cleanup and cask removal behavior.
  • Homebrew/install, official uninstall.sh, options read 23 October 2026.
  • Local read-only checks on macOS 27.0.1, 23 October 2026: brew list --formula, brew list --cask, brew --prefix and brew services list. No cleanup or uninstall was executed.

Sources checked 23 October 2026. Spotted something out of date? Tell us and we'll fix it.

Review developer storage before removing tools

Tend is free to download. Pro is $1.99 a month, $12.99 a year with a 7-day free trial, or $29.99 once.