Does Homebrew offer anything similar to pip's pip install -r requirements.txt
feature? I have a new MacBook Pro arriving today, so one of the first tasks will be to migrate my brew installations. I've already performed a brew list > brew.txt
command. Will I be able to use this to install all the packages it lists in one command on the new machine?
Homebrew – Install All Packages from Text File
homebrew
Related Question
- Mac – How to install both Cocoa and X11 of Emacs (preferably with Homebrew)
- MacOS – Difficulties with El Capitan SIP
- MacOS – os 10.11.6 pip install permission error
- Automate package installation via shell script for macOS
- Mac – List all installed macOS packages
- Imagemagick installed via Homebrew, convert missing
- Terminal – Deciding between Brew vs Official Installer for Installation
- Create Install Script for All Installed Brew Packages and Casks
Best Answer
You can do
brew leaves > my_brews.txt
and then on the new machine dofor i in $(cat brew_leaves); do; brew install "$i"; done
. You can use newlines where there are semicolons above. [assuming bash]