Switch from Rosetta2 to native ARM install #545
-
I have an M1 Mac that I installed brew through Rosetta2. I'd like to try switching to the ARM native version. Is there a best practices approach? Do I need to completely remove everything I installed with it and reinstall? Can I have both versions installed and gradually transition? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Yes, assuming your Rosetta 2 installation was installed to Then, make sure
Then you can alias
Running brew from your terminal should run the ARM version of brew by default. You can verify by using Running a formula will prefer the ARM native version since
|
Beta Was this translation helpful? Give feedback.
-
What's the best way to cleanup the installed packages? My thought was to |
Beta Was this translation helpful? Give feedback.
-
Okay - that worked great. Here are the steps I followed. Migrating to native (ARM) HomebrewThese steps will remove all formulas and taps, preserving installed casks and Mac App Store apps. If you installed a new shell via Homebrew, you will have to change your shell in Terminal/iTerm before step 4 to a natively installed shell.
|
Beta Was this translation helpful? Give feedback.
Yes, assuming your Rosetta 2 installation was installed to
/usr/local
as recommended, if you run the install script now, it'll install the ARM native installation to/opt/homebrew
. This was part of the reason why two different prefixes were chosen.Then, make sure
/opt/homebrew/bin
is added to yourPATH
prepended before/usr/local/bin
. For example, in your.zprofile
or.zshrc
:Then you can alias
/usr/local/bin/brew
toibrew
orx64brew
or something similar:Running brew from your terminal should run the ARM version of brew by default. You can verify by using
brew config
.Running
ibrew
should run the Ro…