LoginSignup
1
3

More than 5 years have passed since last update.

Homebrewをアンインストールし、端末をクリーンな状態に戻し、インストールしたパッケージ群をRestoreする。

Posted at

Homebrewを利用していて、MySQLが起動しなくなったので、homebrewをuninstallして、クリーンな状態に戻す。
その前に現在インストールしているpackagesのバックアップを取る。

package群のバックアップ

$ brew bundle dump

を打つとBrewfileというファイルが出力される。これはbrew経由でinstallしたpackage群を出力しているもの。

# eg
brew "automake"
brew "avrdude"
brew "openssl"
brew "readline"

Brewfileを元にバックアップを復元する場合は下記のコマンドで出来る。

$ brew bundle

Homebrewをuninstall

手順はFAQに載っている。

How do I uninstall Homebrew?

To uninstall Homebrew, paste the command below in a terminal prompt.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

ということで、上記のコマンドをterminalで打てば良い。実行後、homebrewに依存している諸々がuninstallされる。

バックアップからRestore(もとに戻す)

上記の通り、下記のコマンドを打てば戻る(reinstrallされる

$ brew bundle
1
3
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
1
3