AI slop. Use with caution.
Prompt: migrate homebrew "macos" intel silicon
Since it's the same machine, you must do the bundle dump and uninstall before new brew install.
To migrate Homebrew from an Intel Mac to an Apple Silicon Mac, first, install the ARM version of Homebrew by running the installation command for Apple Silicon. Then, you can use brew bundle dump on your Intel Mac to create a Brewfile, which you can use to reinstall your packages on the new system.
GitHub blog.smittytone.net
Migration Steps from Intel to Apple Silicon Homebrew
Preparation
Dump Installed Packages: On your Intel Mac, run the command brew bundle dump to create a Brewfile with your installed packages. Save this file for later use.
Transfer Data: If you no longer have your Intel Mac, you can skip this step and proceed to install Homebrew on your new Apple Silicon Mac.
Install Homebrew on Apple Silicon
Run the Installer: Open Terminal on your Apple Silicon Mac and execute the following command:
/bin/bash -c "$(curl -fsSL
https://raw.githubusercontent.com/Homeb ... install.sh)"
Update PATH: After installation, add Homebrew to your PATH by running:
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Uninstall Intel Homebrew
Download Uninstall Script: Use the command below to download the uninstall script:
curl
https://raw.githubusercontent.com/Homeb ... install.sh --output uninstall.sh
Run the Uninstaller: Execute the uninstall script with the command:
/bin/bash ./uninstall.sh -p /usr/local
Manual Cleanup: After running the uninstaller, manually delete any remaining files in /usr/local to ensure a clean migration.
Reinstall Packages
Use Brewfile: Navigate to the directory containing your Brewfile and run:
brew bundle
This will reinstall all your previously installed packages on the new Apple Silicon Homebrew.
Final Steps
Check for Compatibility: Some packages may not yet have ARM versions. You can keep the Intel version until all necessary tools are available natively.
Run Cleanup: After migrating, run brew cleanup to remove any unnecessary files from both installations.
Following these steps will help you successfully migrate Homebrew from an Intel-based Mac to an Apple Silicon Mac.