3

I am looking for a silent (unattended) way of updating OS X that would not require use intervention.

Is this possible, how?

4
$ sudo softwareupdate --list
$ softwareupdate -a -i && shutdown -r now

The && shutdown -r now is purely optional - if you want to only reboot when needed (or never) you can process the output as softwareupdate will print out messages that a reboot is needed when appropriate. This tool - even if updates come from the App Store app, does not update any purchased apps. You need the GUI to update those apps at present time since Apple did not include a tool to automate those updates.

The first just scans for appropriate updates. The second installs all updates followed by a reboot of the Mac. Play around to see what works best for you. It's trivial to automate these using launchd if that suits your needs as well.

I've had better luck rebooting the Macs before the update. If I'm going to cut users off with unsaved data, I'd rather do that first and let the update go cleanly. Updating a program that is currently running is something I like to avoid.

Here is a nice article explaining the details from Apple. It works fine on non-server version of Mac OS X as noted at the end of the article.

| improve this answer | |
  • I see a big issue with the update command: it will reboot the computer even if there are no updates. – sorin May 15 '11 at 8:28
  • I'll edit the answer since the shutdown won't really work as written (the sudo ends before the && forks as originally written). Since software update will let you know a reboot is needed you can only reboot then or just ignore it until you arrive. – bmike May 16 '11 at 19:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .