Brew 常用命令

HUC-WFX 1年前 ⋅ 3205 阅读

安装包

brew install [包名]

卸载包

brew uninstall [包名]

查询可更新的包

brew outdated

更新包

brew upgrade(更新所有)

brew upgrade [包名]

清理所有包的旧版本

brew cleanup

清理指定包的旧版本

brew cleanup [包名]

查看可清理的旧版本包,不执行实际操作

brew cleanup -n

锁定某个包

brew pin [包名]

取消锁定

brew unpin [包名]

查看帮助

brew help

查看版本

brew -v

更新Homebrew

brew update

查看包信息

brew info [包名]

查看安装列表

brew list

查询可用包

brew search [包名]

卸载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