LoginSignup
4
9

More than 5 years have passed since last update.

備忘録_homebrewもろもろ

Last updated at Posted at 2017-07-22

パッケージのインストール先

homebrewのパッケージは/usr/local/Cellar/にインストールされる。
インストール時にbinにリンクされる。

  • /usr/local/Cellar コマンド実体
  • /usr/local/bin   コマンドのエイリアス

brewの基本的な使い方

インストール / アンインストール

// インストール
$ brew install <パッケージ名>
// アンインストール
$ brew uninstall <パッケージ名>

アップデート / アップグレード

// アップデート
$ brew update
// アップグレード
$ brew upgrade

brew updateはbrew自体も最新にアップデートし、フォーミュラ(パッケージ)も最新にする
brew upgradeはフォーミュラ(パッケージ)のみ最新にする※特定のフォーミュラを指定してupgradeも可能

リスト

// リスト表示
$ brew list

brew listはインストール済みのフォーミュラを一覧表示する

ドクター

// インストールの問題を確認
$ brew doctor

clean up

// clean up
$ brew cleanup

brew cleanupを実施するろインストールしたすべて、もしくは特定のformulaeの古いバージョンをcellarから削除する

brew tapに関して

brew tapとは公式以外のリポジトリをフォーミュラとしてHomebrewに追加することができる。

// インストール
$ brew tap <user/repo>
// アンインストール
$ brew untap <user/repo>

brew-cask

バイナリ形式で配布されているMacアプリケーションをインストールするための拡張

// パッケージを検索
$ brew cask search google

// パッケージの情報表示
$ brew cask info google-chrome

// インストール
$  brew cask install google-chrome

// アンインストール
$ brew cask uninstall google-chrome

// インストール済みのものを表示
$ brew cask list

// 不要なダウンロード済みファイルを削除
$ brew cask cleanup

brew updateでbrew-caskはアプデされるけど、アプリケーションまでは監視しないので下記のコマンドでアプデする

//アップデート
$ brew cask install --force $(brew cask list)
4
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
9