Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能.
1、Homebrew安装.
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2、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
3、Homebrew安装其它工具.
$ brew install <packageName> #<packageName>你将要安装的工具名
$ brew install git #安装git
4、Homebrew卸载其它工具.
$ brew uninstall <packageName> #<packageName>你将要卸载的工具名
$ brew uninstall git #卸载git