How to disable Homebrew automatic update on macOS

The
You can support us by downloading this article in PDF format through the following link.

Download the guide in PDF format

turn off
The

The
The

Homebrew is a free open source software package management system for macOS users. It gives you a flexible way to install UNIX tools that Apple does not include on macOS. Package management covers installation, search, update, cleanup and complete uninstallation. If you often use the brew command line tool, you must note that the tool will perform the update every time you execute the command to install the recipe.

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.t
....

To prevent this update every time you run the brew command, pass 1 To the HOMEBREW_NO_AUTO_UPDATE environment variable.

HOMEBREW_NO_AUTO_UPDATE=1 brew install 

This is an operation. To make it a permanent configuration, go to .bashrc Or .zshrc The file depends on the shell you use.

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

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

Get the shell configuration file:

$ source ~/.bashrc or source ~/.zshrc

Now try to install the formula to confirm whether the setting is valid.

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

We can confirm that no update was attempted.

The
You can support us by downloading this article in PDF format through the following link.

Download the guide in PDF format

turn off
The

The
The

Sidebar