Created
April 22, 2019 15:13
-
-
Save DevoKun/7c0ec4b2b5599aafe2fc43d8f6c6a332 to your computer and use it in GitHub Desktop.
Reinstall Homebrew
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 characters
## | |
## 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