I installed homebrew today. And I did something wrong so that my homebrew can't work now. Since I use an arm based mac, I am hard to find solution to uninstall my homebrew which installed in /opt/homebrew/.
Asked
Active
Viewed 1.4k times
5

Asmoun
- 1,417
- 5
- 20
- 53

pan thomas
- 51
- 1
- 1
- 2
2 Answers
6
To uninstall Homebrew, run the uninstall script from the Homebrew/install repository.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
Download the uninstall script and run /bin/bash uninstall.sh --help
to view more uninstall options.

Asmoun
- 1,417
- 5
- 20
- 53
1
Make sure your homebrew path is correct and then run the script:
echo $HOMEBREW_PREFIX #=> /opt/homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

Rimian
- 36,864
- 16
- 117
- 117