How to Completely Uninstall Homebrew From a Mac

Hongtao Hao / 2020-05-23

My Macbook Air is pretty old1, so I cannot put up with any useless files that take up a lot of space.

When installed, Homebrew takes up over 400MB. That’s a lot of space, at least for me.

I installed Homebrew and then I wanted to delete it. So I went to /usr/local/bin/. I was lost. I couldn’t know which files to delete. Since /usr/local/bin/ is a hidden folder on Mac, I don’t want to mess up with it. However, my urge to delete files I don’t need to use was so strong that I ended up deleting all files except for bin in this folder2.

Out of idol curiosity, and a desire to make sure I didn’t delete any important files, I want to check what files will be created when I install Homebrew.

Here is the result:

Before installation

After installation

So, installing Homebrew has created all the files except for the /bin folder. Also, it has created a brew within the /bin folder.

To uninstall Homebrew, the official method is to run this following command in your Terminal:

/bin/bash -c "$(curl -fsSL"

First, you need to confirm your wish to uninstall:

Warning: This script will remove:
/usr/local/bin/brew -> /usr/local/bin/brew
Are you sure you want to uninstall Homebrew? This will remove your installed packages! [y/N] 

Input y if you are sure. Then the following messages will appear in Terminal:

==> Homebrew uninstalled!
The following possible Homebrew files were not deleted:
You may wish to remove them yourself.

Messages in Terminal

First of all, how can we access the hidden usr/ folder?

Type this following line in your Terminal:

open -a Finder /usr/local/

You can delete the following files as specified above:


However, you SHOULD NEVER delete /usr/local/bin/!

I didn’t check how much spece these files take up, but deleting files I know I don’t need makes me happy.

  1. I bought it back in 2015. ↩︎

  2. This is too reckless. I don’t recommend you to be like this. ↩︎

Last modified on 2021-10-16