15

Homebrew started running brew update automatically before every brew install. This means that I need to wait 10-20 seconds, depending on network speed, every time I want to install a package. This is tedious and unnecessary.

How can I opt out from this behavior, or set it to something saner?

14

Just prefix your install command with HOMEBREW_NO_AUTO_UPDATE=1, like this:

HOMEBREW_NO_AUTO_UPDATE=1 brew install somepackage

Source: brew manpage

1

I personally find pinning/unpinning formulas more useful. For example you install a tool depends on 100 libraries which you don't use.

brew deps someprogram | xargs brew pin

Then you can check your pinned formulas anytime. If you have any problems with the version just unpin.

Not recommended to everyone, to pin all the formulas and manage updates manually:

brew list | xargs brew pin
0

I just modified /usr/local/bin/brew to add HOMEBREW_NO_AUTO_UPDATE=1 (according to @D Schlachter answer) at the start of the file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.