formulaをインストールする
brew install
1 2 3 4 |
$ brew install formula名 //例 $ brew install python3 |
一覧を見る
brew list
1 |
$ brew list |
1 2 3 4 5 6 7 8 9 |
//例 $ brew list autoconf hugo luajit perl sqlite ctags jemalloc mercurial pkg-config tig ctags-objc-ja libtermkey msgpack pyenv tree gdbm libuv neovim python unibilium gettext libvterm nkf python3 vim git libyaml openssl readline xz go lua pcre ruby zsh |
formulaをアンインストールする
brew uninstall
1 2 3 4 |
$ brew uninstall formula名 //例 $ brew uninstall git |
更新があるformulaを見る
brew outdated
1 |
$ brew outdated |
古いバージョンのformulaを削除
brew cleanup
1 2 3 4 |
$ brew cleanup //削除する前に、削除されるformulaのリストを見たい場合はこちらで確認できる $ brew cleanup n |
homebrew本体をアップデートする
brew update
1 |
$ brew update |
formulaをアップデートする
brew upgrade
1 |
$ brew upgrade |
homebrewprefixからデッドシンボリックリンクを削除する
brew prune
1 |
$ brew prune |
おまけ
brew upgradeでエラーが出た場合
1 2 |
$ xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Error: Failure while executing: git config --local --replace-all homebrew.private true |
brew updateまたはbrew upgradeでこんなエラーが出た場合、
1 |
$ xcode-select --install |
xcode-selectをインストールすると解決しました。osがsierraだと起こるらしい。