Mac M1 Upgrade


Posted by Greg Stephens on December 05, 2021 · 1 min read

Re-installing Homebrew and it’s packages when upgrading to the M1

Start by re-running the Homebrew install script which will give you the M1 homebrew in /opt/homebrew/bin. You’ll still have the old Install binary at /usr/local/bin/brew.

/bin/bash -c "$(curl -fsSL"

I ran into a git error and have to remove /usr/local/bin/git.

Update the .zshrc file with an alias to the Intel brew and add the new path:

alias oldbrew=/usr/local/bin/brew

Update Packages

First, look at the Intel packages you have installed

oldbrew list

Use a simple script to

brew install $1
if [ $? -eq 0 ]
  echo Removing old $1
  /usr/local/bin/brew uninstall $1

Remove packages with no remaining dependencies:

oldbrew autoremove