官网
https://brew.sh
安装命令(最好到官网获取最新的安装命令)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
卸载命令
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
还有一种删除Homebrew相关文件的卸载方法,不推荐,能用上面官网的命令还是尽量用官方的吧
// 如果没有权限,试着在rm前加"sudo"
cd `brew –prefix`
brew prune
rm `git ls-files`
rm -r /usr/local/Homebrew
rm -rf .git
rm -rf ~/Library/Caches/Homebrew
rm -rf /usr/local/opt
rm -rf /usr/local/Caskroom
rm -rf /usr/local/var/homebrew