How to update homebrew and upgrade the new packages in one step

bashhomebrew

I often run brew update followed by brew upgrade.

Can I do that in one step?

Best Answer

Yes, by putting the following line in your ~/.bash_profile file:

alias brewu='brew update && brew upgrade --lock'

brewu can be replaced by whatever alias you want to use.