Migrating from Homebrew
Coexistence
nextbrew does not share a prefix with Homebrew. On macOS it uses /opt/nextbrew;
Homebrew keeps /opt/homebrew or /usr/local. On Linux the installer picks
/opt/nextbrew if it exists, otherwise ~/.local/share/nextbrew if that exists,
otherwise /home/nextbrew/.nextbrew. Installing nextbrew leaves Homebrew
untouched.
PATH order
nb init (run by the installer) adds nextbrew’s bin directory to your shell
config. Whichever directory comes first in PATH wins when both provide a
command, so put the one you want first. Run nb init --no-modify-path if you
would rather edit your shell config yourself.
Moving your packages
nb migrate is Partial. Today it:
- lists the packages installed in Homebrew (formulae and casks, including some from other taps),
- shows what it will do and asks for confirmation (skip with
-y/--yes), - taps the third-party taps those packages came from and trusts what moves from them,
- installs the casks and formulae with nextbrew, keeps pinned formulae pinned, and stops Homebrew services and starts them with nextbrew,
- asks whether to uninstall the migrated formulae from Homebrew.
--forceuninstalls from Homebrew even if errors occur.
Formulae that cannot be planned or installed are listed and left in Homebrew.
nb migrateBrewfiles
nb bundle reads the same Brewfile Homebrew uses.
nb bundle
nb bundle dumpSee nb bundle.
Going back
Nothing in Homebrew needs undoing, because nextbrew never changed it. Remove
nextbrew with nb reset and delete the binaries (see the FAQ).
If you let nb migrate uninstall packages from Homebrew, reinstall them with brew install.