contador web Saltar al contenido

Tutorial: how to update your Mac using Terminal

I have absolutely nothing against the concept of the Mac App Store (I mean, having an app store available for Mac, which also serves as a repository for updates to the operating system as a whole). There is much that it needs to improve, and who knows, perhaps there will be significant news in this regard in macOS 10.14.

But if you are one of those who detests MAS, I have good news: it is possible to make system updates without having to open the store. How? By the utility Terminal, following the tutorial below.

?Simple? update via the Terminal

The first thing you need to do, obviously, is to open the Terminal, which is inside the folder / Applications / Utilities /. Then, type the following command followed by Enter:

softwareupdate -l

Wait while your Mac checks for updates available on Apple's servers.

Updating macOS via Terminal

If no updates are available, you will return to the prompt Terminal command line; if there is, see something like the image below:

Updating macOS via Terminal

The available updates always appear as items in a list. In the example I gave, we have only one update. If they were several, they would follow this same format.

The asterisk line shows the individual software update package that is available for your Mac. This line is also known as an "identifier". The second line provides a more detailed description of the update itself, including the version number (usually in square brackets) and the size of the download file in kilobytes. The warning (recommended), as the name implies, means that the update is recommended for all users; j (restart) indicates that the Mac needs to be restarted for the installation to complete.

The easiest way to install is using the command below, which downloads and installs everything that is available at once:

softwareupdate -i -a

Updating macOS via Terminal

Remembering that, after finishing the installation, you will have to restart the Mac manually in the case of updates that request this, of course.

Updating macOS via Terminal

It is also worth noting that the above command must necessarily be performed by an account with administrator privileges.

Other options

It is clear that, in the case of Terminal, this is not the only way to make an update. Check out a short list of available commands:

sudo softwareupdate -ia --verbose

Using the verbose flag, you will have real-time status reports while updates are installed.

softwareupdate -ir

Only installs as recommended by Apple (such as security).

softwareupdate --install NAME

Install only the update you name, replacing NAME with the identifier (in single quotes). In the example above, it would look like this:

softwareupdate --install 'macOS High Sierra 10.13.3 Supplemental Update-'

If the update name happens to have a space at the end, that space must be enclosed in single quotes.

softwareupdate -d NAME

Download, but do not install; then, you can proceed with it using one of the commands above.

softwareupdate --ignore NAME

By doing this (always replacing the NAME with the update identifier in single quotes), you will hide the update in question until another one appears and you will be alerted again.

sudo sh -c softwareupdate -ia && reboot

The Mac will automatically restart if the installation is done without any problems (if it fails, the restart will not happen and you will be able to see the listed errors).

man softwareupdate

To see all commands related to updates via the Terminal.

softwareupdate -h

Idem.

· ? ·

Do you have any related tips to share? Use and abuse the comments!

via MacRumors, 9to5Mac, Make Tech Easier