When to brew update and brew upgrade?

Any advice on how often I should run

brew update
brew upgrade
  1. Often?
  2. Never? Only run brew upgrade <something specific>

Thanks in advance.

@justin I work on Ubuntu and it regularly reminds me about all available updates. All I need to do is to press Install.

But I do not think that you need to update your development machine every day. On the other side production environment have to be as secure as possible with all latest security updates.

I always run brew update before I run brew upgrade. There’s no point in updating to an outdated formula. I use a shell script to run all sorts of updates at once more or less weekly:

# Get OS X Software Updates, and update installed Ruby gems, RBENV, Homebrew, npm, and their installed packages, and oh_my_zsh
alias update='sudo softwareupdate -i -a; brew update; brew upgrade --all; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update;rbenv rehash;upgrade_oh_my_zsh'
1 Like