Last active
December 14, 2015 23:19
-
-
Save mattheath/5165222 to your computer and use it in GitHub Desktop.
Revisions
-
mattheath renamed this gist
Mar 14, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
mattheath created this gist
Mar 14, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ #!/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 /usr/local 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