MacOS – I can’t uninstall Homebrew. How to find and remove all of the Homebrew files and re-install it again

homebrewjavascriptmacmacosterminal

I've deleted a main Homebrew file and now I can't un-install Homebrew. I want to un-install it and then do a fresh install. This is what I'm getting in the Terminal…

host:~ user$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It appears Homebrew is already installed. If your intent is to reinstall you should do the following before running this installer again: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
host:~ user$  ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Failed to locate Homebrew!

I'm bit of a rookie as you can probably tell. How can I sort this?

The main goal is to set up the MEAN stack.

Thanks in advance.

Best Answer

Uninstall Homebrew

From the Homebrew FAQ:

To uninstall Homebrew, paste the command below in a terminal prompt.

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