DEV Community

Ankit malik
Ankit malik

Posted on • Edited on

How to stop Homebrew auto update on mac terminal

redis-install-command

Introduction

I wanted to install redis on my mac but the issue faced by me while install is that it took too much time. So thought of disabling it.

Homebrew is an opensource package manager on mac and most of the people use it to install various tools and software to on mac.

Let's find how to disable the auto-update on homebrew.

How to disable it

There are multiple ways to disable it. Let's look at some ways.



HOMEBREW_NO_AUTO_UPDATE=1 brew install <formula>


Enter fullscreen mode Exit fullscreen mode


export HOMEBREW_NO_AUTO_UPDATE=1


Enter fullscreen mode Exit fullscreen mode

If you are using the above method then you need to make this article/commands handly so that you can access it easily.

Disable Permanently

You can disable auto-update in terminal permanently by setting the environment variable in .bashrc or .zshrc file.

For bash



$ vim ~/.bashrc
export HOMEBREW_NO_AUTO_UPDATE=1


Enter fullscreen mode Exit fullscreen mode


source ~/.bashrc


Enter fullscreen mode Exit fullscreen mode

For zsh



$ vim ~/.zshrc
export HOMEBREW_NO_AUTO_UPDATE=1


Enter fullscreen mode Exit fullscreen mode


source ~/.zshrc


Enter fullscreen mode Exit fullscreen mode

Top comments (0)