Skip to content

Instantly share code, notes, and snippets.

@osteel
Last active May 5, 2022 19:20
Show Gist options
  • Save osteel/12d83f636ed4610ae4884797f311efa8 to your computer and use it in GitHub Desktop.
Save osteel/12d83f636ed4610ae4884797f311efa8 to your computer and use it in GitHub Desktop.
Migrate Homebrew for M1 chips

Run using old install:

$ brew bundle dump

Reinstall Homebrew for the M1:

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Update your PATH so the new install takes precedence (e.g. in your .zshrc):

export PATH="$HOME/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"

Reload your config:

$ source ~/.zshrc

Reinstall packages for the M1:

$ brew bundle --file Brewfile

Optionally create alias to access old install (e.g. in your .zshrc):

alias oldbrew=/usr/local/bin/brew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment