How to update Homebrew after using Migration Assistant to go from an Intel-based Mac to M1.
- Remove
/usr/local/bin
from yourPATH
(e.g.echo $PATH
thenexport PATH=...
without/usr/local/bin
in it)
- This was tricky because
/usr/local/bin
had been added to the path from multiple locations and by multiple processes (also had to check~/.z*
for e.g..zprofile
and.zenv
)
wget https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh
(https://github.com/Homebrew/install#uninstall-homebrew)brew bundle dump
to get a list of installed packageschmod +x uninstall.sh && sudo ./uninstall.sh --path=/usr/local
rm -rf /usr/local/Caskroom && rm -rf /usr/local/Cellar
(if the script didn't do it)brew bundle install --file Brewfile
to reinstall old packages