OS X Software Update From Command Line

By | 2011/03/24

How can I run Software Update from the command line in OS X?

This command will update OS X via the terminal:

sudo softwareupdate -i -a

The output will look something like this:

$ sudo softwareupdate -i -a
Password:
Software Update Tool
Copyright 2002-2009 Apple


   Checking packages…
Installing 	
   Waiting for other installations to complete…
   Validating packages…
   Writing files…
   Running package scripts…
   Optimizing system for installed software…
   Moving items into place…
   Registering updated components…
   Running package scripts…
   Registering updated applications…
   Writing package receipts…
   Cleaning up…
Installed Mac OS X Update
Done.

You have installed one or more updates that requires that you restart your
computer.  Please restart immediately.
$ 

To reboot type this:

$ sudo reboot

Sweet!