This Homebrew message means an update lock is active; stop the stuck brew task, clear stale locks, then run brew update again.
You type a Homebrew command and it shuts you down with “another brew update process is already running.” It feels like brew is yelling at you for something you can’t even see.
This error is usually about one thing: brew thinks a second update is starting while the first one still holds a lock. That can be a real update in another Terminal tab, a background app that triggered brew, or a lock left behind after a crash.
The fix is an order of operations. Check for a live process first. Clear stale locks only when nothing is running.
What This Homebrew Message Means
Homebrew uses lock files so two installs or updates don’t step on each other. A lock is a small file created under your Homebrew prefix, and it tells other brew commands to wait.
You can hit the message during more than brew update. Commands like brew install and brew upgrade may run an update first, depending on your settings. Homebrew lists these behaviors in its man page.
Common Ways You End Up With A Lock
- Two terminals at once — You started one brew command, then ran another in a second tab.
- A background launcher — A tool like Raycast, Alfred, an editor task, or a login script runs brew out of sight.
- A prior crash — A forced quit or OS crash can leave lock files behind even though no brew process remains.
Another Brew Update Process Is Already Running
Think of this message like a traffic light. Green means brew is working and you wait. Red means brew is gone and a leftover lock is blocking you. The steps below sort those cases.
Step 1 Check Whether Brew Is Still Running
Look for a live brew process from the same account that runs Homebrew.
- List brew and git tasks — Run
ps aux | egrep 'brew|git|curl' | grep -v egrepand look for an active brew command. - Use a focused process search — Run
pgrep -fl brewto see brew-related process names with IDs.
If you see an active brew update or a long install, let it finish. If it’s stuck with no output, move to the next step.
To find the active tab, match the PID. Run ps aux | egrep 'brew|git' | grep -v egrep and use the newest line.
Step 2 End The Stuck Brew Task Cleanly
If you confirmed there is a running process and it’s frozen, end it in a controlled way. Start gentle. Go harsher only if it ignores you.
- Interrupt in the same terminal — Press
Ctrl+Cin the tab that started brew, then wait a few seconds. - Send a normal terminate signal — Run
killusing the PID frompgrep -fl brew. - Force quit as a last step — Run
kill -9only if the task will not exit.
Re-run pgrep -fl brew after you stop it. You want it to return nothing before you touch lock files.
Step 3 Know Where The Locks Live
Homebrew stores lock files under your prefix in var/homebrew/locks. On Apple Silicon Macs the prefix is often /opt/homebrew. On Intel Macs it’s often /usr/local. Custom setups exist too.
Rather than guessing, ask brew where its prefix is. This keeps the fix safe across machines.
Fixing The Brew Update Process Already Running Lock
If no brew process is running and the error still appears, you’re dealing with stale locks. Clearing them is quick when you use the prefix that brew reports.
Quick Lock Cleanup
- Print your Homebrew prefix — Run
brew --prefixand note the path. - Remove lock files under the prefix — Run
rm -rf "$(brew --prefix)/var/homebrew/locks". - Run cleanup and health checks — Run
brew cleanup, then runbrew doctor. - Retry the original command — Run
brew updateor your install/upgrade command again.
Homebrew’s Ruby API docs even spell out the lock directory path as (HOMEBREW_PREFIX/"var/homebrew/locks"). You can see that note in the Top Level Namespace docs.
After clearing locks, run ls -la "$(brew --prefix)/var/homebrew". If the locks folder returns, a tool is starting brew. Quit it, then retry.
When You Should Not Delete Locks
If you can see a brew process running, don’t remove locks. Two updates can race, and you can end up with broken tap state. Stop the process first, then retry.
| What You See | Likely Cause | Best First Move |
|---|---|---|
| Error appears while another terminal is busy | Real brew task is already running | Wait or stop that task cleanly |
| No brew process shows up in ps | Stale lock folder from a crash | Remove locks under brew –prefix |
| Error returns on install or upgrade | Auto-update triggers and collides | Run one brew job at a time |
When The Error Keeps Returning
If you clear locks and the message comes back, a repeat trigger is starting brew while you’re also running brew. Find that trigger once and the loop stops.
Auto-Update Triggers From Tools And Scripts
Some tools run brew for you. That includes editor plugins, terminal startup scripts, and auto-update taps. If one of those runs while you install something, you can get the lock message.
You can also control auto-update behavior for commands that trigger it. Homebrew documents an env var named HOMEBREW_NO_AUTO_UPDATE.
- Disable auto-update for one command — Run
HOMEBREW_NO_AUTO_UPDATE=1 brew install. - Disable auto-update for a session — Run
export HOMEBREW_NO_AUTO_UPDATE=1, then run your brew command. - Turn it back off — Run
unset HOMEBREW_NO_AUTO_UPDATE, then runbrew update.
Permissions And Multi-User Installs
If brew was installed under one macOS account and you now run it under another, you can hit lock or git permission errors. You might see messages about files not being writable, or git refusing to create its own lock files.
Fix ownership and permissions on the Homebrew directories, then re-run brew doctor so brew can point out any leftover issues.
Other Issues That Masquerade As A Lock
Clearing locks can get you moving, yet it won’t stop repeats if the real failure is still there. These are the common culprits that leave a lock behind.
Stalled Network Fetches
If brew update looks frozen, run it with debug output so you can see what it is waiting on.
- Run update with debug — Use
brew update -dand watch the last line printed. - Check proxy settings — Run
git config --global --get http.proxyandgit config --global --get https.proxy. - Retry on a cleaner connection — If your network is flaky, try again on a different connection.
Broken Tap State Or Local Changes
If Homebrew’s git checkouts got into a bad state, updates can fail and leave locks behind. Homebrew documents a reset command that fetches and restores repositories to upstream state.
- Run the built-in reset — Use
brew update-reset. Homebrew explains it in the FAQ. - Retry update — Run
brew updateagain and confirm it completes. - Re-run health checks — Run
brew doctorand fix what it flags.
Locked Folders During Unpack
Brew can unpack into temp folders. If a folder is locked at the filesystem level, cleanup may fail and leave temp debris plus locks. A recent Homebrew issue report ties this to locked folders copied from mounted disk images.
If you see leftover homebrew-unpack-... folders, unmount disk images you no longer need, then retry your brew command. You may still need to clear locks after you remove the locked source folder.
A Clean Brew Update Routine That Avoids The Error
Once you’re unblocked, a steady routine cuts down on collisions. The trick is to run one brew job at a time and keep repo state tidy.
- Run a manual refresh — Use
brew updatewhen you can let it finish. - Upgrade with intent — Use
brew upgrade, or target a single formula when you only need one. - Remove old files — Use
brew cleanupto clear old versions and free disk space. - Scan for warnings — Use
brew doctorand fix any actionable messages.
If you hit “another brew update process is already running” again, stick to the same flow. Confirm a live process, stop it cleanly if stuck, then clear stale locks under $(brew --prefix)/var/homebrew/locks and retry.
This also works across Intel Macs, Apple Silicon Macs, and Linux installs because it relies on brew --prefix instead of hard-coded paths.
