how to uninstall homebrew using an arm based Mac?
Asked Answered
E

3

7

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/.

Epistemic answered 25/12, 2020 at 12:0 Comment(0)
R
8

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.

Randolf answered 25/12, 2020 at 12:36 Comment(0)
O
2

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

Ossify answered 18/10, 2021 at 23:17 Comment(1)
echo $HOMEBREW_PREFIX returned the right value but I still got an error: Failed to locate Homebrew!. Fixed it by adding arch -arm64 in front of the install command.Upturned
V
0

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.

Vagarious answered 13/9, 2024 at 23:6 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.