Terminal in OS XTerminal in OS X We all know the familiar Mac OS X Software Update and App Store Updates 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, query the available updates 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

Source

Follow Me:
Top Best Sellers!!