Download the latest version from the Mac App Store
Either run xcode-select --install
or if that fails, manually download them from the Apple Developer Site.
Run /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
Download the uninstall script and run ./uninstall --help
to view more uninstall options.
Clone https://github.com/homebrew/brew into $HOME/homebrew
Add homebrew to your $PATH.
Example:
export PATH="$HOME/homebrew/bin:$HOME/homebrew/sbin:$PATH"
Add a separate bin directory to $PATH if you manually download bins on occasion. For example, composer, nvm, rvm, or go binaries.
export PATH="$HOME/bin:$PATH"
Run brew doctor
and fix any issues it presents. It will always warn about having homebrew outside of /usr/local
, that is ok.