zb migrate command automates the migration of your Homebrew packages to zerobrew. This process identifies your installed Homebrew formulas, installs them using zerobrew, and optionally removes them from Homebrew.
Before You Start
zerobrew can migrate:- Core formulas from
homebrew-core
- Formulas from non-core taps (third-party repositories)
- Casks (GUI applications)
Migration Process
Run the migrate command
Execute the migration command to scan your Homebrew installation:This will display all detected packages:
Review the migration plan
The command will list all core formulas that can be migrated:You’ll be prompted to continue:
Install packages with zerobrew
After confirmation, zerobrew will install each formula:If any packages fail to install, they’ll be listed at the end:
Command Options
Skip prompts with -y
To automatically accept all prompts, use the -y or --yes flag:
- Automatically proceed with migration
- Automatically uninstall migrated packages from Homebrew
Force uninstall with --force
If packages have dependents in Homebrew, the uninstall step may fail. Use --force to ignore dependencies:
--force flag to brew uninstall, removing packages even if other Homebrew formulas depend on them.
Combine options
After Migration
Once migration is complete:-
Verify your packages work correctly:
- Non-core formulas and casks remain in Homebrew and will continue to work
- You can continue using both zerobrew and Homebrew side-by-side
Troubleshooting
Package fails to migrate
If a package fails during migration:- Check the error message for details
- Try installing it manually:
- If it still fails, the package may not be fully supported yet
Homebrew uninstall fails
If uninstall from Homebrew fails:Related Commands
- Brewfile Management - Export migrated packages to a Brewfile
zb list- View all installed zerobrew packageszb info <formula>- Get information about a specific package