How to migrate Homebrew from Intel to Apple silicon (before macOS 28)
If you set up your Apple silicon Mac by migrating from an Intel one, there's a good chance you're still running an Intel copy of Homebrew. Migration Assistant copied /usr/local across as-is, Rosetta 2 ran it without complaint, and nothing told you otherwise. That's now on a deadline. Homebrew has stopped building Intel packages, and Apple says that after macOS 27 Rosetta is kept only for certain older games. Here's how to migrate Homebrew from Intel to Apple silicon: check what you have, save your package list, install the native version and reinstall everything in about half an hour.
How to tell which Homebrew you're running
The two installs live in different places, so the path tells you:
| Intel Homebrew | Native Homebrew | |
|---|---|---|
| Prefix | /usr/local | /opt/homebrew |
| Runs as | x86_64, through Rosetta 2 | arm64, natively |
| New bottles (prebuilt packages) | No longer built | Yes |
| Homebrew support tier | Tier 3 (not supported) | Tier 1 on macOS 15, 26 and 27 |
| On macOS 28 | Expect it not to run | Unaffected |
In Terminal, run:
which -a brew
If you see /usr/local/bin/brew, you have an Intel install. If you see both paths, you have two, and whichever comes first is the one you've been using. brew config confirms it: an Intel install on an Apple silicon Mac reports Rosetta 2: true, and recent versions print a loud warning that you're on an unsupported Intel configuration.
To check an individual tool, file $(which git) prints the architectures inside the binary. arm64 is native. x86_64 on its own means Rosetta.
Why it's worth doing now
Homebrew's support tiers page is direct about Intel. It says Homebrew has stopped building new Intel bottles, classes every Intel macOS setup as Tier 3 ("not supported"), and plans to remove the ability to run on Intel "in or after September 2027". In practice, an Intel install on your M-series Mac compiles more and more packages from source, and when one fails to build, nobody is going to fix it for you.
Then macOS 28 removes Rosetta for anything that isn't an older game. An Intel Homebrew and every command-line tool it installed would stop running on the day you upgrade. Migrating while the old install still works lets you export its list of packages and compare the two side by side, instead of rebuilding from memory after it has broken.
Step 1: Save a list of everything installed
Use the old brew, by full path, to write a Brewfile:
/usr/local/bin/brew bundle dump --file=~/Brewfile-intel
A Brewfile is a plain-text list of your taps, formulae, casks and, if you use them, Mac App Store apps and VS Code extensions. Open it and delete anything you no longer want. Migrating is the cheapest clean-up you'll ever get.
If you run background services through Homebrew (a database, say), note them too:
/usr/local/bin/brew services list
Step 2: Make sure your terminal is native
This is the step that trips people up. Homebrew's installer now checks the CPU architecture and aborts with "Homebrew on macOS is only supported on Apple Silicon processors!" if the shell runs as x86_64. You'll hit that if your terminal is set to run through Rosetta, which was common advice in 2021.
uname -m
It should print arm64. If it prints x86_64, quit the terminal, select it in Finder, press ⌘I and untick Open using Rosetta. Then relaunch and check again. Do the same for iTerm or whatever terminal you use.
Step 3: Install native Homebrew
Run the standard installer from brew.sh:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
On Apple silicon it installs to /opt/homebrew and leaves /usr/local alone, so the two can sit side by side during the move. At the end it prints the exact line to add to ~/.zprofile. It's an eval "$(/opt/homebrew/bin/brew shellenv)" line, and you should copy it exactly as printed.
Step 4: Fix your shell config
Open ~/.zprofile and ~/.zshrc and look for anything pointing at the old install: an eval "$(/usr/local/bin/brew shellenv)" line, or a PATH export that puts /usr/local/bin first. Delete or comment them out, open a new terminal window, and check:
which brew
It should now print /opt/homebrew/bin/brew. If it still says /usr/local, something later in your config is putting the old path back in front.
Step 5: Reinstall from the Brewfile
brew bundle install --file=~/Brewfile-intel
That installs every tap, formula and cask on the list as native builds. Most of it will be quick, because native bottles exist for nearly everything. Two things to expect:
- Casks that are already in /Applications. The apps themselves were copied across by Migration Assistant, so the new
brewmay stop with "It seems there is already an App at…". For an identical copy,brew install --cask --adopt <name>tells Homebrew to take over the existing app rather than reinstall it. - The occasional formula that won't build. If something fails, check whether it's still maintained before spending an evening on it. An abandoned Intel-only tool is exactly what macOS 28 is about to retire anyway.
Restart any services you noted with brew services start <name>.
Step 6: Rebuild what was linked to the old prefix
Homebrew packages are only half of it. Anything built against the old install is still Intel, and some of it hard-codes /usr/local:
- Language versions installed by pyenv, rbenv, asdf, nvm and similar. Reinstall the versions you use so they compile as
arm64. - Virtual environments, native gems and
node_moduleswith compiled extensions. Recreate them rather than copying them. - Scripts, editor settings and launch agents that call
/usr/local/bin/somethingby full path. A quickgrep -r "/usr/local" ~/.zshrc ~/.zprofile ~/.configfinds most of them.
Step 7: Remove the Intel install
Only once everything you use works from the native install. Homebrew's own uninstall script can target a specific prefix, and its README gives this exact migration as the example:
curl -fsSLO https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh
/bin/bash uninstall.sh --path /usr/local
Afterward, look at what's left in /usr/local rather than deleting the whole folder. Other installers put files there too, and they aren't Homebrew's to remove.
Finally, run through the rest of the Mac with the same eye. Our guide to finding Intel apps before macOS 28 covers apps, login items and plug-ins, the parts of the move Homebrew can't see.
Frequently asked questions
Can't I just move /usr/local to /opt/homebrew?
No. The binaries inside are x86_64, and the install location is built into the packages at install time. Moving the folder gives you broken Intel tools in a new place. Reinstalling from a Brewfile is the supported route.
Can I keep both installs?
For now, yes. Some people kept an ibrew alias (arch -x86_64 /usr/local/bin/brew) for one stubborn package. But the Intel side is unsupported, gets no new bottles, and loses Rosetta with macOS 28, and the current installer refuses to create a new Intel install at all. Treat it as a stopgap.
Will Migration Assistant fix this for me on my next Mac?
No. It copies /usr/local exactly as it finds it, which is how most people end up here. If your next Mac is also Apple silicon and you've already migrated, there's nothing to fix. Copy your Brewfile across and run brew bundle install there.
Does this matter if I'm still on an Intel Mac? Differently. Your Homebrew is native to your hardware, but Homebrew now classes every Intel Mac as Tier 3 and plans to stop running on Intel in or after September 2027. Intel Macs also can't run macOS 27. See which Macs run macOS 27.