Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew failed on installation, but now won't uninstall

Tags:

homebrew

I used the following command to install Homebrew:

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

Which then returns this as an error:

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)"

When I run that command in terminal, I simply get "Failed to locate Homebrew!"

like image 328
sc1892353 Avatar asked Jan 26 '26 17:01

sc1892353


1 Answers

I had the same issue on mac OS. A lot of answers on here advised me to remove /usr/local/.git but this did not exist. My solution was as follows:

I navigated to:

/usr/local/Homebrew/bin

And ran:

./brew doctor

It warned me Homebrews bin was not found and advised me to add it to my .bash_profile like so:

echo 'export PATH="/usr/local/Homebrew/bin:$PATH"' >> ~/.bash_profile

After this I started a new session and I was back brewing

like image 117
sidarcy Avatar answered Jan 29 '26 03:01

sidarcy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!