Skip to content

Instantly share code, notes, and snippets.

@yuechuanx
Created August 10, 2023 07:50
Show Gist options
  • Save yuechuanx/b648f946b223f9a61d8c57b7e98be172 to your computer and use it in GitHub Desktop.
Save yuechuanx/b648f946b223f9a61d8c57b7e98be172 to your computer and use it in GitHub Desktop.
Homebrew 常用命令
# 更新与升级
brew update 自动升级homebrew(从github下载最新版本)
brew outdated 检测已经过时的软件
brew upgrade 升级所有已过时的软件,即列出的以过时软件
brew upgrade <formula> 升级指定的软件
brew pin <formula> 禁止指定软件升级
brew unpin <formula> 解锁禁止升级
brew upgrade --all 升级所有的软件包,包括未清理干净的旧版本的包
# 清理与卸载
brew cleanup -n 列出需要清理的内容
brew cleanup <formula> 清理指定的软件过时包
brew cleanup 清理所有的过时软件
brew uninstall <formula> 卸载指定软件
brew uninstall <fromula> --force 彻底卸载指定软件,包括旧版本
# 查找
brew list 显示所有的已安装的软件
brew search text 搜索本地远程仓库的软件,已安装会显示绿色的勾
brew search /text/ 使用正则表达式搜软件
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment