Skip to content

Instantly share code, notes, and snippets.

@skyzyx
Last active May 16, 2022 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skyzyx/8fc25e8698ef420dec15e087301255e3 to your computer and use it in GitHub Desktop.
Save skyzyx/8fc25e8698ef420dec15e087301255e3 to your computer and use it in GitHub Desktop.
Migrate from macOS Intel → Apple Silicon

Migrate from macOS Intel → Apple Silicon

Just some notes for when I have to do this again. Not a full migration guide.

If you're reinstalling on a fresh profile, this isn't necessary. But Migration Assistant will copy over all of your Intel-compiled Homebrew settings and binaries like a dumb-ass. (I know it's not Apple's fault, but it's still frustrating.)

Homebrew

Migration discussion

brew autoremove
brew list > ~/Desktop/brew.txt

Make edits to ~/Desktop/brew.txt for what you care about. Then, let's remove the Intel versions.

brew list | xargs -I% brew uninstall -f --ignore-dependencies "%"

Reinstall your brew packages from your edited list of only what you care about.

~/Desktop/brew.txt | xargs -I% brew install "%"
  1. Some packages will be no longer available. That's fine. Just remove the package from the list and try again.
  2. Some packages will be "already installed". Keep track of these in a text file, so we can follow-up with them.
  3. Some packages will be from custom taps. Keep track of these in a text file, so we can follow-up with them.

Once you get everything installed afresh, pull up your list of "already installed" packages. Let's reinstall them.

~/Desktop/brew-already-installed.txt | xargs -I% brew reinstall "%"

…or if they're Casks…

~/Desktop/brew-already-installed-casks.txt | xargs -I% brew reinstall --cask "%"

For the custom taps, search the web for them to find their homepages. Follow the instructions in their READMEs to re-install them.

tfswitch

If you work with Terraform a lot, you know that having a single version installed doesn't scale well. tfswitch solves this problem intelligently.

But Migration Assistant probably copied over your Intel versions. Delete them and re-install them.

rm -Rf ~/.terraform.versions/
tfswitch --latest
terraform --version

Look for darwin_arm64 in the Terraform output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment