Created
August 26, 2011 11:25
-
-
Save mxcl/1173223 to your computer and use it in GitHub Desktop.
Uninstall Homebrew
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e | |
/usr/bin/which -s git || abort "brew install git first!" | |
test -d /usr/local/.git || abort "brew update first!" | |
cd `brew --prefix` | |
git checkout master | |
git ls-files -z | pbcopy | |
rm -rf Cellar | |
bin/brew prune | |
pbpaste | xargs -0 rm | |
rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions | |
test -d Library/LinkedKegs && rm -r Library/LinkedKegs | |
rmdir -p bin Library share/man/man1 2> /dev/null | |
rm -rf .git | |
rm -rf ~/Library/Caches/Homebrew | |
rm -rf ~/Library/Logs/Homebrew | |
rm -rf /Library/Caches/Homebrew |
For me this command worked! 🍺
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, @self-creative! You saved my time a lot.