How to completely uninstall brew and re-install brew in ubuntu 19.04

walid thalib picture walid thalib · Jul 25, 2019 · Viewed 21.2k times · Source

I installed homebrew on ubuntu 19.04 and it's accidentally stop, so the install not complete. but the folder already created.

If I install it again

sudo apt install linuxbrew-wrapper

I get a message:

linuxbrew-wrapper is already the newest version

but if I write command :

brew upgrade

I get this message:

Command 'brew' not found, but can be installed with:

sudo apt install linuxbrew-wrapper".

Can anyone help me fix this?

Answer

mlecar picture mlecar · Nov 7, 2020

Maybe this can help more people...

I just executed the following command line

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

This is the same url as in here Homebrew homepage but instead of install.sh, I used uninstall.sh.

homebrew uninstall