How to Uninstall all programs and packages installed by Homebrew

How can I completely uninstall Homebrew and uninstall everything it has installed?

image
DownloadNp
Last Updated: May 27th 2021

Keeping your Mac clean can be a difficult task if you use Homebrew to install packages for development and testing purpose and without correctly installing the right packages, it may bloat your system, taking up unwanted storage space.

Will uninstaller uninstall everything Homebrew has ever installed and all their dependencies, or is Homebrew going to leave a ton of stuff on my system?

SOLUTION:

If you want to remove all the packages you've installed but keep Homebrew around you could also do something like:

This one command will uninstall all the packages install through Homebrew.

brew remove --force $(brew list) --ignore-dependencies  

 

You can also run.

brew list -1 | xargs brew rm

 

To remove unused archives run.

brew cleanup

 

To remove Cask packages

brew cask remove --force $(brew cask list)

 

Please Login to Comment