一、官方网址
Homebrew
二、目录
- 安装
- 查看帮助信息
- 查看版本
- 更新Homebrew自己
- 安装软件包
- 查询可更新的包
- 更新包 (formula)
- 清理旧版本
- 锁定不想更新的包
- 卸载安装包
- 查看包信息
- 查看安装列表
- 查询可用包
- 卸载Homebrew
三、常用命令
//安装依赖工具
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew help
brew -v
brew update
brew install [包名]
//安装git
brew install git
//安装git-lfs
brew install git-lfs
//安装wget
brew install wget
//安装openssl
brew install openssl
brew outdated
//更新所有
brew upgrade
//更新指定包
brew upgrade [包名]
//清理所有包的旧版本
brew cleanup
//清理指定包的旧版本
brew cleanup [包名]
//查看可清理的旧版本包,不执行实际操作
brew cleanup -n
//锁定某个包
brew pin $FORMULA
//取消锁定
brew unpin $FORMULA
brew uninstall [包名]
//例:卸载git
brew uninstall git
brew info [包名]
brew list
brew search [包名]
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
四、参考文章
网友评论