How can I update homebrew and upgrade the new packages in one step?
Yes, by putting the following line in your ~/.bash_profile file:

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


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