Skip to content

Instantly share code, notes, and snippets.

@arpitHub
Forked from mxcl/uninstall_homebrew.sh
Created March 28, 2014 07:29

Revisions

  1. @mxcl mxcl revised this gist Apr 10, 2012. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions uninstall_homebrew.sh
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,15 @@
    # 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
  2. @mxcl mxcl revised this gist Apr 9, 2012. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions uninstall_homebrew.sh
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,8 @@

    set -e

    /usr/bin/which -s git || abort "brew install git first!"

    cd `brew --prefix`
    git checkout master
    git ls-files -z | pbcopy
  3. @mxcl mxcl revised this gist Mar 14, 2012. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion uninstall_homebrew.sh
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@
    set -e

    cd `brew --prefix`
    git checkout master
    git ls-files -z | pbcopy
    rm -rf Cellar
    bin/brew prune
    @@ -15,4 +16,4 @@ 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
    rm -rf /Library/Caches/Homebrew
  4. @mxcl mxcl revised this gist Jan 14, 2012. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion uninstall_homebrew.sh
    Original file line number Diff line number Diff line change
    @@ -14,4 +14,5 @@ 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/Logs/Homebrew
    rm -rf ~/Library/Caches/Homebrew
  5. @mxcl mxcl revised this gist Jan 14, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions uninstall_homebrew.sh
    Original file line number Diff line number Diff line change
    @@ -14,3 +14,4 @@ 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
  6. @mxcl mxcl revised this gist Oct 25, 2011. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions uninstall_homebrew.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,9 @@
    #!/bin/sh
    # Just copy and paste the lines below
    # 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!

    set -e

    cd `brew --prefix`
    git ls-files -z | pbcopy
    rm -rf Cellar
    @@ -11,4 +13,4 @@ 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/Caches/Homebrew
  7. @mxcl mxcl created this gist Aug 26, 2011.
    14 changes: 14 additions & 0 deletions uninstall_homebrew.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/bin/sh
    # Just copy and paste the lines below
    # MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!

    cd `brew --prefix`
    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