Every brew install can start with ==> Auto-updating Homebrew..., and on a Mac that hasn’t run brew in a while that line costs real time. On a macOS VM whose Homebrew was 17 days stale, installing a 193 KB formula took 15.0 seconds with auto-update and 7.7 seconds with HOMEBREW_NO_AUTO_UPDATE=1. Half the wait was Homebrew updating itself, not the package you asked for.
This guide covers the one-off prefix, the permanent switch and the weekly HOMEBREW_AUTO_UPDATE_SECS window. It finishes with a launchd job that keeps the tree current without slowing installs down. Every command below was run on macOS 27.2 with Homebrew 7.0.16 on an M4 Mac mini in November 2026, with the stale-cache and launchd tests in a Tart macOS VM.
See when Homebrew auto-updates
Auto-update doesn’t run on every command. Before install, upgrade, outdated, bundle or tap with a tap name, Homebrew checks the age of /opt/homebrew/.git/FETCH_HEAD, the file that git fetch touches each time brew updates. If that file is older than the update window, brew runs brew update first and only then installs what you asked for, so the delay depends on how long ago the last update happened.
The window itself changes with what you’re doing. These are the defaults from the Homebrew manpage environment section and its auto-update.sh source.
| Situation | Update window |
|---|---|
| Normal install, upgrade, outdated, bundle or tap | 86400 s (24 hours) |
| After a developer command has run | 3600 s (1 hour) |
HOMEBREW_NO_INSTALL_FROM_API set, or installing user/tap/formula | 300 s (5 minutes) |
| JSON API check for new formula and cask data | 450 s (HOMEBREW_API_AUTO_UPDATE_SECS) |
On a daily driver only the first install of the day pays the cost. Install a formula by its full tap name, such as hashicorp/tap/terraform, and brew shortens the window to 300 seconds, so that cost can come back every five minutes. To see it, we backdated FETCH_HEAD by two days and cleared the API cache, which is the state your Mac is in on a Monday morning.
time brew install hello
Brew prints the auto-update banner plus a hint that names the two variables this guide is about. The install itself took a fraction of the 2.5 seconds total, and the rest was the update plus the refetch of the API cache we had cleared.

That hint only prints when neither HOMEBREW_AUTO_UPDATE_SECS nor HOMEBREW_NO_ENV_HINTS is set, so it goes away as soon as you configure either one. If brew itself is missing, or /opt/homebrew/bin isn’t on your PATH, sort that out first with the Homebrew install guide for Apple Silicon, because none of the settings below matter until brew config runs.
Skip the update for one command
When you need one package right now, prefix the command with the variable. It applies to that single run and leaves your normal behaviour alone, so it’s the right choice inside scripts you share with other people. Nobody wants a setup script that quietly changes how their brew works.
time HOMEBREW_NO_AUTO_UPDATE=1 brew install hello
No banner and no fetch this time, and the install took 1.260 seconds against 2.507 for the run that updated. The API cache was warm again by then, which accounts for part of the gap, so the table further down separates the two effects.

The variable needs a value. Homebrew only detects environment variables that are set to something, so export HOMEBREW_NO_AUTO_UPDATE on its own does nothing and the update still runs. Use =1, which is the convention the manpage uses for every switch.
Disable Homebrew auto update permanently
zsh is the default shell on macOS, so the export goes in ~/.zshrc. If you still run bash, use ~/.bash_profile instead. Oh My Zsh users edit the same ~/.zshrc, and our zsh and Oh My Zsh setup on macOS shows where it loads. Append the line and reload the shell.
echo "export HOMEBREW_NO_AUTO_UPDATE=1" >> ~/.zshrc
source ~/.zshrc
Don’t trust the export alone. brew config prints every Homebrew variable it actually picked up, so it is the check that proves brew sees the setting rather than just your shell.
brew config
Look for HOMEBREW_NO_AUTO_UPDATE: set between the prefix and the Ruby lines. The rest is the context a maintainer asks for when you file a bug, so it is worth knowing where it lives.
HOMEBREW_VERSION: 7.0.16
ORIGIN: https://github.com/Homebrew/brew
HEAD: 7ef183d10e7d6e5620d7124b744b1dfbf69fc108
Last commit: 2 days ago
Branch: stable
Core tap: N/A
Core cask tap: N/A
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_NO_AUTO_UPDATE: set
Homebrew Ruby: 4.0.10 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/4.0.10/bin/ruby
CPU: deca-core 64-bit arm_donan
Clang: 21.0.0 build 2100
Git: 2.54.0 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 27.2.1-arm64
CLT: 27.2.0.0.1792721180
Xcode: N/A
Rosetta 2: false
Here is the whole sequence on the test Mac, with the file contents and the shell environment checked in between.

If brew config does not list the variable, the process that started brew never read that file. Editor tasks and extensions in VS Code or Cursor, AI agent runners, cron and launchd jobs are the usual offenders, because none of them is guaranteed to source ~/.zshrc. That is the case the next section solves.
Use brew.env instead of a shell export
Homebrew reads its own environment files, so a setting there works no matter which shell, IDE or job starts brew. It loads three of them in this order, and a later file wins over an earlier one.
/etc/homebrew/brew.env(system-wide)/opt/homebrew/etc/homebrew/brew.env(prefix)~/.homebrew/brew.env, or$XDG_CONFIG_HOME/homebrew/brew.envwhen that is set (user)
On a personal Mac the user file is the one to edit. On a managed fleet the admin writes /etc/homebrew/brew.env and adds HOMEBREW_SYSTEM_ENV_TAKES_PRIORITY=1 to that same file, so users cannot override the policy from their home directory. Create the user file.
mkdir -p ~/.homebrew
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> ~/.homebrew/brew.env
The counts below are the proof. The shell environment has zero matches for the variable, yet brew config still reports it set, because brew loaded it from the file at startup.

Write plain KEY=value lines with no export in front. The manpage says these files don’t expand shell variables such as $HOME and don’t run commands, so anything clever there is read as a literal string and quietly ignored by whatever expected a path. One more catch: brew exports these values after it reads your shell environment, so a variable set in brew.env can’t be overridden for one command from the shell. That is exactly what you want on a CI image and a nuisance on a laptop.
Make auto-update run less often
Homebrew’s own documentation for HOMEBREW_NO_AUTO_UPDATE recommends a longer HOMEBREW_AUTO_UPDATE_SECS instead. It also warns that disabling updates and then tapping new taps can leave a broken configuration. A weekly window keeps most installs fast while the tree still moves forward. Treat it as an alternative to the permanent switch, not an addition: brew returns from its auto-update check the moment HOMEBREW_NO_AUTO_UPDATE holds any value, so a window set next to it never fires. If you followed the previous section, undo it first by deleting the export line from ~/.zshrc, removing ~/.homebrew/brew.env (or just its HOMEBREW_NO_AUTO_UPDATE line), and running unset HOMEBREW_NO_AUTO_UPDATE in any open terminal. Then set the window to 604800 seconds.
echo "export HOMEBREW_AUTO_UPDATE_SECS=604800" >> ~/.zshrc
source ~/.zshrc
To test it, we left FETCH_HEAD two days old, the same state that triggered the update in the first capture. With the weekly window brew skipped the update and finished in 1.296 seconds.

Once that file is more than seven days old, the next install updates first and resets the clock. An explicit value also replaces the five-minute window brew would otherwise use for full user/tap/formula installs, because the defaults in the table only apply while the variable is unset. That makes this setting the better fit if you live on a tap such as hashicorp/tap. It does not stop the separate JSON API refresh, though: installs still re-download formula and cask data older than HOMEBREW_API_AUTO_UPDATE_SECS (450 seconds), which only HOMEBREW_NO_AUTO_UPDATE skips.
Hide the hint without changing anything
If the update itself doesn’t bother you but the two-line hint does, HOMEBREW_NO_ENV_HINTS=1 removes only the hint. With it exported and FETCH_HEAD still old, the update ran as before and just stopped explaining itself.
==> Auto-updating Homebrew...
==> Fetching downloads for: hello
✔︎ Bottle hello (2.12.3)
==> Pouring hello--2.12.3.arm64_golden_gate.bottle.1.tar.gz
🍺 /opt/homebrew/Cellar/hello/2.12.3: 12 files, 193.3KB
That variable also silences the hints other commands print, so treat it as a cosmetic setting. It saves no time at all.
Measure the difference on your Mac
We timed brew install hello on the M4 Mac mini, three runs per host scenario, uninstalling between runs so every install poured the same bottle. Setting HOMEBREW_AUTO_UPDATE_SECS=1 forced an update on every run, and the second row also deleted the 31 MB API cache before each forced run. The no-auto-update runs that followed found that cache already rebuilt, so their column is a warm-cache figure. The stale row comes from fresh clones of a macOS VM image whose Homebrew hadn’t updated in 17 days: two default runs and three with the variable set.
| Scenario | Auto-update runs | HOMEBREW_NO_AUTO_UPDATE=1 |
|---|---|---|
| M4 host, update forced, API cache warm | 2.16 to 2.17 s | 1.25 to 1.26 s |
| M4 host, update forced, API cache deleted (31 MB) | 2.46 to 2.51 s | 1.25 to 1.26 s (cache warm) |
| M4 host, default, updated within 24 hours | 1.25 to 1.26 s (skipped) | 1.25 to 1.26 s |
| macOS VM, Homebrew 17 days stale | 15.04 to 15.20 s | 6.95 to 8.18 s |
On a datacenter link the update costs about a second, which roughly doubles a small install but is easy to live with. The stale Mac is where it hurts. Before touching hello, brew downloaded a new portable Ruby, reported four taps updated, including core and cask, and listed 39 new formulae and 64 new casks, trimmed in the capture below.

Taps and Ruby inflated that number, and both are common on real Macs. Every extra tap is another git fetch (the VM had three third-party taps, buildkite/buildkite, equinix-labs/otel-cli and openai/tools, and the update fetched two of them plus core and cask), and a Homebrew release that bumps its bundled Ruby downloads it during the update. So the more taps you keep and the longer you go between installs, the bigger the saving. To get your own figure, run this pair after a few days away from brew.
ls -l /opt/homebrew/.git/FETCH_HEAD
time brew install hello
brew uninstall hello
time HOMEBREW_NO_AUTO_UPDATE=1 brew install hello
You only get one honest default run per window, because the install that updates also refreshes FETCH_HEAD. Repeating it straight away just measures the skip. On an Intel Mac, swap /opt/homebrew for /usr/local/Homebrew in the first command.
Update on a schedule with launchd
Disabling auto-update without a replacement means formula definitions go stale and brew outdated stops telling the truth. The clean fix is a LaunchAgent that runs brew update every morning, so installs during the day skip the update and still see current data. Create the plist in your user LaunchAgents folder.
mkdir -p ~/Library/LaunchAgents
vim ~/Library/LaunchAgents/local.brew-update.plist
Paste this job definition. It runs at 09:00 local time and appends output to /tmp/brew-update.log. On an Intel Mac, change the program path to /usr/local/bin/brew.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.brew-update</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/brew</string>
<string>update</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>9</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<key>StandardOutPath</key>
<string>/tmp/brew-update.log</string>
<key>StandardErrorPath</key>
<string>/tmp/brew-update.log</string>
</dict>
</plist>
A typo in a plist fails at load time with an unhelpful message, so lint it first. Then load it into your GUI session and confirm launchd knows the label.
plutil -lint ~/Library/LaunchAgents/local.brew-update.plist
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/local.brew-update.plist
launchctl list | grep brew
Don’t wait until tomorrow to find out whether it works. kickstart starts the job immediately but returns before it finishes, so give it a moment (a stale tree took about 10 seconds here) and check that tail /tmp/brew-update.log shows the update ending. Then launchctl print shows the run count and the exit code.
launchctl kickstart gui/$(id -u)/local.brew-update
launchctl print gui/$(id -u)/local.brew-update | grep -E "state|runs|last exit"
We ran these steps in the VM through tart exec, which lands in the logged-in admin user’s session, so the gui domain was there. The job ran once with exit code 0, and FETCH_HEAD jumped from November 7 to the current time. The log held the same update the stale install had been paying for inline: a new portable Ruby, four taps and 17 outdated formulae.

To remove the schedule later, unload it with launchctl bootout gui/$(id -u)/local.brew-update and delete the plist. We’d keep brew upgrade out of the job, because an unattended upgrade can swap a Python or Node version under a project mid-week. Updating only refreshes metadata, so it’s safe to run while you’re away. Two launchd habits are worth knowing: a 09:00 run missed while the Mac slept fires when it wakes, but one missed while it was powered off is skipped until the next day. Recent macOS also posts a “Background Items Added” notice when the agent loads, and it shows up under System Settings, General, Login Items & Extensions, under App Background Activity, where it can be switched off.
Bootstrap failed: 125: Domain does not support specified action
We hit this first on the Mac mini, loading the agent over SSH with nobody logged in at the screen. The gui/501 domain only exists for a user with a graphical login session, and trying user/501 instead failed with Bootstrap failed: 5: Input/output error. Log in on the desktop (or through Screen Sharing), open Terminal there and run the same bootstrap command. To check whether the domain exists before you try, ask launchd for it directly.
launchctl print gui/$(id -u) >/dev/null 2>&1 && echo "gui domain present" || echo "no gui domain"
Over SSH on the Mac mini, with nobody at the screen, that printed no gui domain, which matches the 125 error. Don’t lean on launchctl managername for this: it reports the session your own shell runs in (System over our SSH login), not whether your user has a graphical session somewhere else.
Pick the right setting
The three settings solve different problems and are meant to be used one at a time, so pick by what the Mac is for rather than by which variable you read about first.
- Personal laptop:
HOMEBREW_AUTO_UPDATE_SECS=604800plus the launchd job - CI runner or golden image:
HOMEBREW_NO_AUTO_UPDATE=1inbrew.env - Shared script: the one-off prefix, nothing global
For CI a frozen tree is the point, since every job should install the same bottles and you rebuild the image to move forward. The Cirrus Labs macOS base image we cloned for the VM tests already ships HOMEBREW_NO_AUTO_UPDATE=1 in the admin user’s ~/.zprofile for that reason. It also means a timing test on such an image measures nothing until you unset it, which cost us one wasted run. Our Tart guide for macOS VMs on Apple Silicon covers cloning images like it.
Whichever you choose, run brew update by hand before you report a bug or install from a tap you just added. The maintainers ask for it, and stale metadata is the first thing they’ll suspect. The rest of the day-to-day commands, from pinning and cleanup to Brewfiles, are in our Homebrew cheat sheet. The reverse problem, a current brew rejecting syntax from an old guide such as brew cask install, is not something an update fixes; the unknown command cask error fix covers the --cask form that replaced it. Broken compiles after a macOS upgrade usually point at the Xcode Command Line Tools instead, and the Mac terminal commands cheat sheet has the launchctl commands used around this setup.
thanks