Sponsors

Apple Store

Visit the official Apple Store to buy a Mac online. Free shipping!



Editors' Picks


Comments

Contact Us

Search

Top Posts

Categories

Recent Posts

Our Feeds


Install software updates from the command line

We all know the familiar Mac OS X Software Update panel, it pops up weekly to give us a nice GUI interface to install all the latest updates to our Apple software. But did you know that you can get the same list, and even install updates from the command line? Installing software updates from the command line is incredibly useful for remote management of machines, just SSH into a Mac and run the appropriate commands. Read on for more…


To install software updates from the command line, you’ll use the aptly named ’softwareupdate’ command. Here are the most relevant usages of the command for most users:

softwareupdate -l will give you a list of all updates available
softwareupdate -i [package name] will install the specified package
softwareupdate -i -a will install all updates available
softwareupdate -i -r will install only the recommended updates
softwareupdate --ignore [package name] will ignore specified update
softwareupdate --help for more info on the softwareupdate command

You’ll likely need to use the sudo command to actually install the updates on a Mac, simply place sudo in front of one of the above commands to run it with full permissions as root.
For example: sudo softwareupdate -i -r

Digg!


Social bookmarks:


Comments:

Comments: 3

Comment from Peter Rose
Time: April 19, 2007, 12:35 am

Somehow I have never known about this, you just made my job a whole lot easier though, thanks a bunch

Comment from anon
Time: October 8, 2007, 1:53 pm

For the record, I would recommend against doing this for the time being — it seems to have hosed my machines recently, hard to say if it’s from the updates or from using this command. I think it’s buggy.

Pingback from Mac Info » Blog Archive » Software Update z příkazové řádky
Time: April 14, 2008, 6:38 am

[…] Zdroj: OSXDaily […]

Write a comment





April 18th, 2007