Reputation: 71
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/.
Upvotes: 7
Views: 22411
Reputation: 1
If the steps here https://github.com/homebrew/install#uninstall-homebrew do not work, it's probably because you installed Homebrew using Rosetta, and you are trying to remove it without using Rosetta. (To verify, navigate to /Applications/Utilities/Terminal.app
, right click and select Get Info)
When using Rosetta, you won't pass the check for arch -arm64
in the script.
You can probably have the same issue if you try to remove a Homebrew installed with Rosetta with Terminal not using Rosetta.
Upvotes: 0
Reputation: 38418
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)"
See: https://github.com/homebrew/install#uninstall-homebrew
Upvotes: 2
Reputation: 1747
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.
Upvotes: 8