zb migrate command helps you transition from Homebrew to zerobrew by automatically installing your existing Homebrew packages using zerobrew, and optionally uninstalling them from Homebrew.
When to Use
Usezb migrate when you:
- Want to switch from Homebrew to zerobrew for your existing packages
- Need to preserve your current development environment while gaining zerobrew’s performance benefits
- Want to automatically handle package migration instead of reinstalling manually
zerobrew is experimental. We recommend running it alongside Homebrew rather than as a replacement. Only core formulas from homebrew-core can be migrated.
Usage
Options
Skip confirmation prompts and proceed with migration automatically
Pass
--force to brew uninstall when removing packages from Homebrew (uninstalls even if other packages depend on them)What Gets Migrated
The migration process handles different package types:- Core formulas (from homebrew-core): ✅ Migrated to zerobrew
- Non-core formulas (from third-party taps): ⚠️ Skipped (not supported)
- Casks (GUI applications): ⚠️ Skipped (zerobrew only supports CLI tools)
Migration Process
The command follows these steps:- Discovery: Scans your Homebrew installation for all installed packages
- Filtering: Identifies which packages can be migrated (core formulas only)
- Confirmation: Prompts for confirmation unless
--yesis used - Installation: Installs each formula using zerobrew
- Cleanup: Optionally uninstalls successfully migrated formulas from Homebrew
Examples
Interactive Migration
Review packages and confirm before proceeding:Non-Interactive Migration
Skip all prompts:Force Uninstall from Homebrew
Use--force to uninstall packages from Homebrew even if they have dependents:
Error Handling
If some packages fail to install:- Successful installations are tracked separately
- Failed packages remain in Homebrew
- Only successfully migrated packages are offered for Homebrew uninstallation
- A summary shows which packages failed and why
Post-Migration
After migration:- Successfully migrated packages are available via zerobrew
- Run
zb listto see installed packages - You can still use Homebrew for packages that couldn’t be migrated
- Non-core formulas and casks remain in Homebrew
Related Commands
zb install- Install individual packageszb list- View installed packageszb uninstall- Remove packages from zerobrew