Update macOS

How to use softwareupdate to keep your Mac, well, up to date.

What I don’t do

Apple recommends that you let the OS automatically keep things updated. That sounds appealing but automatic updates happen unpredictably, including when you are in a crunch and cannot afford to lose access to your computer. I once missed an important work deadline because Mac chose to install a hefty update that took hours (no I am not exaggerating) to install. I no longer let it automatically update whenever it feels like it.

Failing that, Apple will recommend that you use the GUI update tool. My experience however is that it gets stuck a lot. It starts to download, then slows to a crawl or stops entirely with no diagnostic information. I have spent far more time fumbling with that than I care to admit, which is why I no longer waste my time with it.

What I do

    I periodically update Mac manually using the command line. Once a week works for me; your needs might be different. To do so, open a terminal and give the command:

    softwareupdate -l

    This prints a list of available updates. Check the list to decide what you want and whether you want it now. Here’s an example I saw:

    Software Update found the following new or updated software:
    * Label: Safari17.0VenturaAuto-17.0
    	Title: Safari, Version: 17.0, Size: 161835KiB, Recommended: YES,
    * Label: macOS Sonoma 14.0-23A344
    	Title: macOS Sonoma 14.0, Version: 14.0, Size: 4403737KiB, Recommended: YES, Action: restart,

    Here we see two available updates: a Safari update, and macOS 14.0 Sonoma. Notice that the latter requires a reboot. Apple has burned me before with point zero OS versions, so I will take the former but pass on the latter.

    Now download what you want. You are spoiled for choice here:

    • To download and install particular items, sudo softwareupdate -i 'ITEM1' 'ITEM2'. You can continue to use your computer while this is working. Following our example, this would be a good way to get the Safari update, so sudo softwareupdate -i 'Safari17.0VenturaAuto-17.0'.
    • To download particular items but not install them yet, sudo softwareupdate -d 'ITEM1' 'ITEM2'. This is useful for continuing to use your computer while downloading items that will require a reboot when installed, such as the OS upgrade we saw in our example. That would be sudo softwareupdate -d 'macOS Sonoma 14.0-23A344'.
    • To download and install everything available, including performing unannounced reboots if needed, sudo softwareupdate -irR. This is a good one-and-done command to have your computer take care of things unattended.

    If a package name has spaces in it, it must be surrounded by single quotes. I find it easier to simply put single quotes around all package names and not worry about it, as seen above.

    If you chose to download items without installing them, wait until you won’t mind a possibly lengthy reboot. Then give the final one-and-done command shown above. I like to run that at the end of the day on Friday so it has all night to chug away, and I have the whole weekend to fix things if needed. And yes I have seen macOS upgrades take almost all night to install, and yes I have seen broken installs that require the weekend to fix.

    To be clear, this updates the OS and Safari, and probably nothing else. You will have to do other things to keep the rest of your Mac’s software up to date:

    • To update the other applications that come built in to macOS, and the applications that you installed via the App Store, open the App Store and press Updates. The App Store is supposed to quietly keep these things updated in the background but my experience is that this doesn’t happen and I have to manually check.
    • To update the applications you installed via Homebrew, use the command brew upgrade.
    • To update the applications you downloaded and installed directly, you are on your own, just as if you were using Windows. Which is why you should have installed them via Homebrew.

    Speaking of App Store updates, my experience with them is the same as updating macOS via the GUI: it often works poorly. Sadly, there is no equivalent to softwareupdate for App Store updates as far as I know.

    There’s more to softwareupdate than this. man softwareupdate will tell you all the options, or for a newbie-friendly introduction you can read How to Update macOS Using a Simple Terminal Command.

    This information was last reviewed 29 September 2023 and valid on macOS 13.6 and an Intel Mac.

    About Warren Post

    So far: Quality Assurance crash test dummy, jungle guide, tech support monkey, entrepreneur, IT consultant, teacher, beach bum, diplomat, over-enthusiastic cyclist.
    This entry was posted in Uncategorized and tagged . Bookmark the permalink.

    Leave a comment