安装Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
卸载Homebrew
cd `brew --prefix`
rm -rf Cellar
brew prune
rm `git ls-files`
rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
rm -rf .git
rm -rf ~/Library/Caches/Homebrew
安装任意包
brew install <packageName>
例如安装git brew install git
卸载任意包
brew uninstall <packageName>
例如卸载git brew uninstall git
查询可用包
brew search <packageName>
查看已安装包列表
brew list
查看任意包信息
brew info <packageName>
更新Homebrew
brew update
查看Homebrew版本
brew -v
Homebrew帮助信息
brew -h