How To

How To Disable Homebrew Auto update on macOS

Homebrew is a free and open-source package management system for macOS users. It gives you a flexible way to install the UNIX tools Apple doesn’t include on macOS. The package management covers installation, searching, updating, cleanup and complete uninstallation. If you’re a frequent user of brew command line tool you must have noted that it performs update every time a command to install formula is executed.

Original content from computingforgeeks.com - post 61164

See the example below to install ranger formula:

$ brew install ranger
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Casks
browserosaurus

==> Downloading https://ranger.github.io/ranger-/1.9.3_2-1
....

To prevent this update whenever you run a brew command, pass 1 to the HOMEBREW_NO_AUTO_UPDATE environment variable.

HOMEBREW_NO_AUTO_UPDATE=1 brew install <formula>

This is a one time operation. To make it a permanent configuration set the variable in your .bashrc or .zshrc file depending on the shell you use.

### Bash ###
$ vim ~/.bashrc
export HOMEBREW_NO_AUTO_UPDATE=1

### Zsh ###
$ vim ~/.zshrc
export HOMEBREW_NO_AUTO_UPDATE=1

Source the shell configuration file:

source ~/.bashrc
#OR
source ~/.zshrc

Now try and installation of formula to confirm the setting was effective.

$ brew install iproute2mac
==> Downloading https://github.com/brona/iproute2mac/releases/download/v1.4.0/iproute2mac-1.4.0.tar.gz
Already downloaded: /Users/jkmutai/Library/Caches/Homebrew/downloads/fdb133eaa8f1346a259295ba9aa22ab568e0dd6b6506cafab6891ae6e31fcf84--iproute2mac-1.4.0.tar.gz🍺  /usr/local/Cellar/iproute2mac/1.4.0: 6 files, 22.5KB, built in 2 seconds

We can confirm no update was attempted.

Keep reading

macOS Keyboard Shortcuts Cheat Sheet (Golden Gate and Tahoe) Cheat Sheets macOS Keyboard Shortcuts Cheat Sheet (Golden Gate and Tahoe) Install Sway on Fedora 45 / 44 with Waybar Desktop Install Sway on Fedora 45 / 44 with Waybar Check version of Installed Package on Ubuntu / Debian Debian Check version of Installed Package on Ubuntu / Debian EC2 Mac Instance on AWS: Run mac-m4.metal for Just 24 Hours AWS EC2 Mac Instance on AWS: Run mac-m4.metal for Just 24 Hours Best USB-C Hub and Thunderbolt Dock for MacBook Air and Pro macos Best USB-C Hub and Thunderbolt Dock for MacBook Air and Pro How the internet can help you gain a broader audience for your event Tips & Tricks How the internet can help you gain a broader audience for your event

1 thought on “How To Disable Homebrew Auto update on macOS”

Leave a Comment

Press ESC to close