Command Line Software Update in MacOS

root's picture

Almost all operating system have command line commands. They are always there, even if we do not know about them.
Actually, the GUI programs that provide us ways to do things, like Disk Util for example, are just a graphical wrap over the command line tool. And they do not provide all the features.

Today, I will show you how to update your MacOS via command line. Benefits: you only need to restart once and the first phase of the installation can be done while you do your stuff so no need to wait for the progress bar to fill up and then reboot.

1. List available updates:

fmbp15:winshit.pvm florian$ softwareupdate -l
Software Update Tool

Finding available software
Software Update found the following new or updated software:
   * macOS High Sierra 10.13.4 Developer Beta-4
	macOS High Sierra 10.13.4 Public Beta (4), 2277556K [recommended] [restart]

Update the available entries (all):

fmbp15:winshit.pvm florian$ softwareupdate -i -a
Software Update Tool

Finding available software

Downloading macOS High Sierra 10.13.4 Public Beta
Downloaded macOS High Sierra 10.13.4 Public Beta
Installing macOS High Sierra 10.13.4 Public Beta
Done.

You have installed one or more updates that requires that you restart your computer.
Please restart immediately.
To automate the restart process with softwareupdate(8), use --restart.

Now, if you restart, the rest of the update will continue. Enjoy!

Extra:

When choosing the update, you need to use all characters from the label and sometimes there is a space at the end - silly, right?)

fmbp16:~ florian$ softwareupdate -d 'macOS Catalina 10.15.7 Update-'
Software Update Tool

macOS Catalina 10.15.7 Update-: No such update
fmbp16:~ florian$ softwareupdate -d 'macOS Catalina 10.15.7 Update- '
Software Update Tool

Downloading macOS Catalina 10.15.7 Update
Downloaded macOS Catalina 10.15.7 Update
Done.

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root