Uninstall Homebrew From Mac and Linux Easily: A Comprehensive 101

uninstall homebrew

If you are tired of command-line packages and want to uninstall Homebrew with something more permanent and innovative, there are some other ways that can prove to be very effective when it comes to uninstalling any program or, in this case, uninstall Homebrew.

This article will show you how to uninstall Homebrew from Mac OS. We at toolspond will try our best to comprehend the matter at hand to the best of our knowledge, and we hope our guide will be fruitful for you.

The present article would cater to your need to uninstall Homebrew permanently with all the commands such as barrel and brewery packages using commands. This will allow you to altogether remove any file that is left on your device, as sometimes there are some files always left on the device if you follow a simple command-line package that only partially removes the software.


Ways to conveniently uninstall Homebrew

Ways to conveniently uninstall Homebrew

There are always more than one ways to complete a task. Likewise, to uninstall Homebrew from your mac, there are some methods that can be a little complex but fruitful. Also, there can be some simple ones available too, but they seldom work and would only complete the work partially. Hence we are gonna use the complex one but will ease you through it.

One of the easiest “complex” ways to uninstall Homebrew would be to use ruby and curl commands in your MacBook command prompt. You just need to execute some commands on your Macbook command prompts, which are listed below.

Totally based on your macOS version, you may use the following command to delete Homebrew:

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

For uninstalling Homebrew from the macOS Sierra, El Capitan, or earlier, you may use the following command

ruby -e "$ (curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)" 

The main purpose of the curl command is that it works collaboratively with the ruby command, which, on execution, downloads te homebrew installation package from the homebrew repository, that is, from GitHub. Then once executed, the curl and ruby commands uninstall the homebrew package completely.

Manually remove the script from the Homebrew program.

If you are worried about executing a script downloaded over the Internet (Which is quite understandable for the security-conscious people), you may read, write the script code or even test it on the device from where you want to uninstall Homebrew.

The uninstall script for Homebrew could be found at the following URL:


Save the script you will find from the above site, and then save it with whatever the name you want to save it with. Also, for any assistance, you can always use the help command, which is as follows.

./help uninstall

 You can uninstall Homebrew using any one of the techniques discussed above. This shall remove and uninstall Homebrew along with all the associated files with it. But if you want to just uninstall only a part of it, or some specific files, follow the next commands instead.

Uninstall Homebrew using specific packages

Uninstall Homebrew using specific packages

You can always delete all the homebrew directories, dependencies, formulas, and all related files manually from large-scale Homebrew directory locations. This includes deleting all the individual items in Homebrew in Mac. This is one option to the things, but there is one problem with it: its complexity and variability of user configurations and installed packages is something we don’t want to list and don’t intend to address here as it is beyond the scope of the present discussion.

It’s a lengthy procedure that crawls through numerous system-level directories. This strategy is not acceptable for the majority of users – sophisticated or otherwise – and will hence be ignored. 

If you’re still interested because you know there are nerds everywhere, use the Find, Find, and mdfind commands to locate all of your Mac’s Homebrew, Brewery, Barrel, and Basement data.

Some general tips

All of the techniques given above are simple, and if you follow the Homebrew installation instructions, the removal is complete. Of course, if you require and use Homebrew, there is no need to uninstall it; but, if you installed Homebrew by mistake and later learned that it was not valuable to you, it may be time to remove it.

Advantages of Command-line interface

The Command-line Interface (CLI) is a text-based user interface for interacting with computers. Users will need to input instructions as text and receive text-based feedback instead of using the mouse to engage. You may, however, lack a good package manager that allows you to install free and open-source software. Homebrew is a well-known macOS package manager that will enable you to install many types of applications via the terminal. Even installing the development tools on your PC will require Homebrew. Uninstall the Homebrew operation can be successfully completed from here!

Uninstall Homebrew in Linux (Linuxbrew)

Linuxbrew is a Linux clone of MacOS’s homebrew package manager, which allows users to install applications in their home directory.

It has the following features:

  • Allows packages to be installed in a user’s home directory without requiring root access.
  • Allows third-party applications to be installed (not packaged on the native distributions).
  • When the version of a package available in the distribution repository is outdated, this feature allows you to install the most recent version.
  • You can also use brew to manage packages on both your Mac and Linux PCs.

How to Uninstall Homebrew (Linuxbrew) from a Linux System

If you no longer wish to use Linuxbrew, you may uninstall it with the command.

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/uninstall)" $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/uninstall)"

https://docs.brew.sh/Homebrew-on-Linux is the home page for Linuxbrew.

Uninstall Homebrew Using Python

Uninstall Homebrew Using Python

Run a simple command from Python to uninstall Homebrew –

import subprocess
subprocess.run(['ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"'])

But note that if you’ve installed Python using Homebrew, the command might break in between the execution.

FAQs on How to Uninstall Homebrew From Mac

How to uninstall Homebrew in ubuntu?

To remove just the linuxbrew-wrapper package.
sudo apt-get remove linuxbrew-wrapper
If you want to delete configuration and data files, use
sudo apt-get purge linuxbrew-wrapper

Is Homebrew available on Windows?

Unfortunately, Homebrew is not available on Windows yet, and it is only limited to Mac OS and Linux.

On what repository does Homebrew work?

github.com/Homebrew/brew This is the repository.

Leave a Comment

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

Scroll to Top