打开终端(terminal)
一、安装
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
二、使用
1.查看Homebrew命令:
brew help #查看命令
2.安装任意包:
brew install <packageName>,#eg:brew install telnet
3.卸载任意包:
brew uninstall <packageName>,#eg:brew uninstall git
4.查询可用包:
brew search <packageName> #查询
5.查询已安装包列表:
brew list #列表
6.查看任意包信息:
brew info <packageName>
7.更新Homebrew:
brew update #更新
8.Homebrew帮助信息:
brew -h #帮助
9.查看brew版本:
brew -v #版本
10.整理重复语句:
open ~/.zshrc -e、open ~/.bash_profile -e
三、卸载
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
评论区