I interrupted the execution of homebrew while installing. Consequently, I ran into a problem mentioned here Error found when loading /home/user/.profile:. I had to comment eval statements in the configuration file to solve the problem. However, I completely want to remove brew. Kindly, suggest any solution.
- 187
3 Answers
I installed brew with the homebrew install script which installs in /home/linuxbrew/.
I just found that one folder, where it resided, I removed that, and freed up 3GB:
sudo rm /home/linuxbrew/ -Rf
Check for remaining brew components with
locate -e brew | egrep -iv '(hebrew|ansible)' | grep brew
- 17,371
- 34,024
- 52
- 172
- 299
From SO and documentation:
Remove with the provided uninstallation script
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"As always, before running any script from internet on your machine, it is a good practice to read the source code to check if it only does what it should.
Remove directories for some reason not removed by the uninstaller:
sudo rm -rf /home/linuxbrew/Also remove the following line from
~/.profile:eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"Otherwise, you will get this awful blocking message while trying to login.
Run sudo du -sh /home/linuxbrew/ to compare the space gain (probably at least 1GB).
- 17,371
You can use this to check if it left anything behind in one of the system directories:
https://github.com/shundhammer/qdirstat/blob/master/doc/Unpkg-View.md
You'll still have to carefully go through your home directory to check if it left anything behind there.
- 3,525