How to update your system from the terminal on macOS

Published February 11, 2017

There may be some instances where you would like to script the ability to update your Mac. You can use the following command from the terminal in order to update your macOS system. With the R flag set, it will automatically reboot your system, if any updates require that.

sudo softwareupdate -iaR