Skip to content

Instantly share code, notes, and snippets.

@DevoKun
Created April 22, 2019 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DevoKun/7c0ec4b2b5599aafe2fc43d8f6c6a332 to your computer and use it in GitHub Desktop.
Save DevoKun/7c0ec4b2b5599aafe2fc43d8f6c6a332 to your computer and use it in GitHub Desktop.
Reinstall Homebrew
##
## Remove homebrew
##
cd `brew --prefix`
rm -rf Cellar
brew prune
rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
rm -rf ~/Library/Caches/Homebrew
##
## Install homebrew
##
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
##
## Install GNU Tools
##
brew install binutils
brew install diffutils
brew install ed
brew install findutils
brew install gawk
brew install macvim
brew install meld
brew install gnu-indent
brew install gnu-sed
brew install gnu-tar
brew install gnu-which
brew install gnutls
brew install grep
brew install gzip
brew install screen
brew install watch
brew install wdiff --with-gettext
brew install wget
##
## The Homebrew project [removed the --with-default-names option](https://discourse.brew.sh/t/why-was-with-default-names-removed/4405)
## so now the GNU tools must be added to the path.
##
gfind -L /usr/local/opt -name gnubin | gawk '{print "export PATH=\""$0":$PATH\"";}' >> ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment