LoginSignup
13
7

More than 5 years have passed since last update.

Homebrew でインストールしたパッケージを自動でアップグレードする

Posted at

Homebrew でインストールしているパッケージを自動でアップグレードする方法をメモっとく。

terminal-notifier をインストールする

自動アップグレードを通知するために terminal-notifier を Homebrew でインストールする。通知が不要であればインストールする必要はない。

$ brew install terminal-notifier

terminal-notifier のインストールを確認する

下記のコマンドを実行して macOS の通知が表示されれば無事にインストールできている。(自分の環境ではインストール後に再起動したら無事に表示されたので、通知が表示されない場合は再起動してみるといいかもしれない。)

$ terminal-notifier -message 'Hello, world!'

homebrew-update をインストールする

下記のコマンドで Homebrew に自動アップグレードの機能を追加する。

$ brew tap domt4/autoupdate

homebrew-update で自動アップグレードを設定する

下記のコマンドで Homebrew に自動アップグレードを設定する。--start で自動アップデートし、--upgrade で自動アップグレードし、--cleanup で古いバージョンを削除し、--enable-notification で自動アップグレードを通知するように設定する。

$ brew autoupdate --start --upgrade --cleanup --enable-notification
13
7
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
13
7