Skip to content

Instantly share code, notes, and snippets.

@mgiacomini
Created October 8, 2014 03:00
Show Gist options
  • Save mgiacomini/0f347eb7a8c8712d75f1 to your computer and use it in GitHub Desktop.
Save mgiacomini/0f347eb7a8c8712d75f1 to your computer and use it in GitHub Desktop.
Uninstalling homebrew
#!/bin/bash
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment