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.)
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 "%"
- Some packages will be no longer available. That's fine. Just remove the package from the list and try again.
- Some packages will be "already installed". Keep track of these in a text file, so we can follow-up with them.
- 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.
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.