Answer
For most Intel‑Mac users the safest, simplest fix is to correct the ownership of the /usr/local/Cellar directory so that the current user has write access. Changing ownership of the whole /usr/local tree is unnecessary and can interfere with other installers that expect root ownership.
Migrating Homebrew to the Apple‑Silicon prefix /opt/homebrew on an Intel Mac is possible but creates a second, independent Homebrew instance. It is only advisable if you plan to keep a dual‑architecture setup or want to experiment with the new prefix. In the long run, the Intel installation will remain dormant on Apple‑Silicon machines, so keeping the /usr/local prefix is perfectly fine for future migration.
Why Ownership Fix is Preferable
- Minimal impact – only the Homebrew-managed directories are touched.
- No SIP interference –
/usr/local is outside System Integrity Protection.
- Future‑proof – on Apple‑Silicon Macs Homebrew automatically switches to
/opt/homebrew without affecting the existing /usr/local installation.
Step‑by‑Step Fix
Check current ownership:
ls -ld /usr/local /usr/local/Cellar
If the owner is root or another user, change it to your account:
sudo chown -R $(whoami) /usr/local/Cellar
This command preserves the parent /usr/local permissions and only affects the Cellar where Homebrew writes.
Verify permissions are now writable by the user:
ls -ld /usr/local/Cellar
Run Homebrew’s health check:
brew doctor
A clean output indicates the change is safe.
Ensure other tools still work (e.g., Xcode command‑line tools):
xcode-select -p
Any failure here suggests an unintended side effect.
When Migration to /opt/homebrew Makes Sense
- You want a clean separation between Intel and Apple‑Silicon formulae.
- You plan to run both prefixes simultaneously and wish to avoid PATH conflicts.
- You need to experiment with Homebrew’s new Apple‑Silicon build process without touching your existing setup.
To migrate, install a fresh Homebrew instance with the desired prefix and reinstall formulas:
env HOMEBREW_PREFIX=/opt/homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install $(brew list)
Keep in mind this duplicates disk usage and requires maintaining two separate caches.
Long‑Term Implications for Apple‑Silicon Migration
- Intel
/usr/local Homebrew remains untouched on Apple‑Silicon Macs; Homebrew will automatically use /opt/homebrew instead.
- Duplicate binaries only arise if you install the same formula in both prefixes and the
PATH order is ambiguous.
- Maintaining a single prefix (either
/usr/local or /opt/homebrew) keeps the system simpler and reduces the risk of stale or conflicting binaries.
Verification Checklist
ls -ld /usr/local/Cellar shows ownership as your user and mode drwxr-xr-x (or drwxrwxr-x if you added group write).
- Running
brew doctor reports no insecure directory warnings.
- System tools like
gcc, make, and xcode-select run without permission errors.
- No SIP‑related messages appear in Console after the change.
Quick Summary
- Prefer changing ownership of
/usr/local/Cellar to your user.
- Migration to
/opt/homebrew is optional and creates a separate Homebrew instance.
- Future Apple‑Silicon migration is unaffected by keeping the Intel prefix; only the
PATH and HOMEBREW_PREFIX environment will change.
- Verify after any change with
brew doctor and system tool checks.