Updating a Mac isn’t hard. It is, however, time-consuming. Seems like every little update that needs installed results in you staring at a progress bar for 20 minutes. You’ll be pleased to learn, then, that by installing updates through Terminal, you can shave quite a bit of downtime off of your day. Plus, any excuse is a good excuse to use Terminal for something.
Before you go ahead with any of this, always ensure you have a recent backup of your computer. That’s standard operating procedure, though, so obviously you already have a backup. And bear in mind that updates done via Terminal work well for system updates and updates to built-in applications – iTunes, Photos, etc – but not for third-party apps or Apple apps downloaded separately. Even if the app was downloaded from the Mac App Store. Sorry to say you’ll still need to run the old-fashioned update on occasion.
First and foremost, launch Terminal. You’ll find that in the Utilities folder, inside of the Applications folder.
With a Terminal window open, type the following command: softwareupdate -l
Your Mac will search for any available software updates. Sometimes there won’t be any available, which is fine. But if there are, you’ll see something like this:
Available updates always appear as a list. The asterisked line indicates the individual software update package available for download, also known as the identifier. The line after that provides some greater detail on the update, including the size, version number, whether it’s recommended for all Users, and whether it requires a restart of your computer after installation.
To download and install a specific update from a list, use the following command, replacing NAME with the desired update’s identifier:
softwareupdate -i NAME
Or:
softwareupdate –install NAME
If you’d like to download, but not yet install, a specific update, there’s a similar command:
softwareupdate -d NAME
Once downloaded, the -i or –install command can be used to complete the installation, or you can use the Mac App Store.
And finally, if you want to download and install all available updates in the list, use the following command:
softwareupdate -i -a
With these commands, you’ll be able to download and begin installation for any updates in the background, while you continue to work on other things. Terminal will typically prompt you to restart the computer to complete the procedure, but you’ll find that the restart goes by much more quickly without the need to download and begin installation of an update. This can save you loads of time over a long stretch!