Close
Stay up to date with all things Laravel, Tailwind, WordPress & PHP

Subscribe now to my e-mail newsletter and get my latest articles and project updates delivered directly to your inbox. Never miss an update.

How to uninstall Homebrew on macOS – Full Guide (2021)

Homebrew is a great tool to manage packages on macOS. However, there might come a moment that you want to fully uninstall it. Perhaps you need to do a clean install again or there is an other reason. Anyway, uninstalling Homebrew is not difficult. In this tutorial, I’ll show you how to uninstall Homebrew.

Uninstalling Homebrew is very similar to the way it is installed. Open up your terminal and paste the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

This script will show you what it will delete and ask you if you want to continue uninstalling Homebrew. Type ‘y’ to continue the uninstall.

Note: please be aware that this also uninstalls every package you installed. You can’t uninstall Homebrew and keep the packages.

If the script asks you for your password, enter it. Sometimes it needs additional permissions to access certain directories.

Removing additional directories

At the end of the uninstall, Brew will give you a message like this:

The following possible Homebrew files were not deleted.
/opt/homebrew/...
/opt/homebrew/...
/opt/homebrew/...
...
You may wish to remove them yourself.

There are two options for the file paths:

  • Apple Silicon Macs – if you’re using a Mac with a chip from Apple (like the Apple M1), each path will look like this: /opt/homebrew/additional/path/here.
  • Intel Macs – if you’re using a Mac with an Intel-chip, each path will look like this: /usr/local/additional/path/here.

This doesn’t matter. What does matter, though, is that you delete them. Open Finder, go to the folders mentioned (normally they’re all in the same folder), and delete them.

Learn how to install Homebrew correctly

After you’ve removed Homebrew, you might want to install it again. Visit this article and see how to do it.

Stay up to date with all things Laravel, Tailwind, WordPress & PHP

Subscribe now to my e-mail newsletter and get my latest articles and project updates delivered directly to your inbox. Never miss an update.

Image Ralph J. Smit
Ralph is a designer gone developer. He happily lives in the Netherlands. His passion for good design drove him towards development, because he felt that no-code tools were too limiting. On this blog, Ralph writes the articles he would've wanted to have during his continual developer journey. → Follow on Twitter

Comments

Leave a reply

Your email address will not be published. Required fields are marked *