Installing OS X Software Updates from the Terminal

I discovered today that one of our Mac servers had not correctly shifted to Daylight Savings Time on Sunday…. somewhere along the line this box dropped of our sysadmin’s watch list. Unfortunately, I was on the road so I couldn’t get to the console to run the update myself.

Now with my Redhat Enterprise Linux servers, I routinely patch them from the UNIX shell:

up2date -u --nox

This will run up2date without the X Windows GUI (–nox … get it?). Surely there is a way to do this with a Mac?

In fact there is! The shell command is softwareupdate.

If you want to check what the updates are before you actually install them so they don’t do something nasty (and who wouldn’t?) just use the list flag:

softwareupdate -l

When you’re ready to install the updates, just use the install and all flags:

softwareupdate -i -a

You may need to use sudo to do this if you’re logged in (and who wouldn’t be?) as a non-privileged user.

For more useful Terminal tricks for managing OS X servers, see

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>