2

I am trying to install a macOS update from the command line. Let's see what updates are available:

$/usr/sbin/softwareupdate -l
Software Update Tool

Finding available software
Software Update found the following new or updated software:
* Label: macOS Catalina 10.15.7 Update- 
    Title: macOS Catalina 10.15.7 Update, Version:  , Size: 5099042K, Recommended: YES, Action: restart, 

But what is the actual label? According to this resource https://www.macrumors.com/how-to/update-macos-terminal-command/ it is the exact wording:

enter image description here

So the analogous value here would be macOS Catalina 10.15.7 Update- . However that does not work:

 $/usr/sbin/softwareupdate -i "macOS Catalina 10.15.7 Update-"
Software Update Tool

macOS Catalina 10.15.7 Update-: No such update
No updates are available.

I also tried some variants:

(python39) 10:25:21/~ $/usr/sbin/softwareupdate -i "macOS Catalina 10.15.7 Update"
Software Update Tool

macOS Catalina 10.15.7 Update: No such update
No updates are available.

$/usr/sbin/softwareupdate -i "macOS Catalina 10.15.7"
Software Update Tool

macOS Catalina 10.15.7: No such update
No updates are available.

So then how is the softwareupdate tool supposed to be used ?

8
  • I don't know whether it makes any difference but if I read man softwareupdate then examples provided there don't include quotation marks. Feb 26, 2021 at 18:57
  • @AivarPaalberg That does not work: each of the space separated tokens is treated as a separate installation request. The man is incorrect. Feb 26, 2021 at 18:59
  • @AivarPaalberg The example in the man page doesn't have spaces in the tag. The quotes are required by the shell to ensure that the whole tag is read as one argument.
    – nohillside
    Feb 26, 2021 at 19:01
  • Simply said you need sudo to install software via softwareupdate. The error message isn't really helpful though.
    – nohillside
    Feb 26, 2021 at 19:07
  • @nohillside Thanks, it makse sense. However, does it mean that this part of man is also incorrect: `item ... One or more specified updates. The --list output shows the item names you can specify here, prefixed by the * or - characters Feb 26, 2021 at 19:11

2 Answers 2

1

As of Sept 2021, when attempting an upgrade to Catalina 10.15.7...

I ran into the same problems as OP but was forced to modify my solution from accepted answer.

No amount of the following made a difference on their own. The result was always the same.

  • sudo
  • /usr/sbin
  • Label v Title name

The Fix

This is the line that eventually worked for me: sudo /usr/sbin/softwareupdate -ia 'macOS Catalina 10.15.7 Update'

Breakdown of CLI

  • sudo I threw this in even though I'm running as system. It worked.
  • /usr/sbin/softwareupdate proper shell pathing should void the need to add the path, but multiple forums suggested otherwise. So, it didn't hurt to add and it worked
  • -ia ... WTF? -i is for install... so that's good. -a is for all available... see below
  • 'this is the actual Title of the update, not the label': To get this, I run softwareupdate -l | grep Title. Then I pull out the title from the other info

This is Stupid & Broken

Yes. The Fix worked. But... why was it necessary to use the -a flag? That's expressly saved for installing all available updates. However, when running this command, it only installed the targeted update and left the BigSur update uninstalled.

Apple has clearly broken something in the tool, and it seems with the impending MDM restrictions and deprecation in macOS Big Sur, has no intention of fixing this.

I hope this works for you before Apple sunsets remote administration completely.

2
  • I cant' really test this but will assume it is correct since you have clearly read and understood the other answers . So the assumption will be that you have a valid "update" to the accepted answer. If any reader tries this please do comment to let us know how this answer is doing relative to the one from @nohillside Sep 24, 2021 at 17:15
  • @WestCoastProjects... understood and appreciated. And yes, FWIW, this was tested. I didn't want to have to write this answer or test this solution. I would have been very content if the approved answer was correct. I also have no doubt that this answer will need to be updated for specific versions of MacOS as their rollback of remote administration support grows with each new release, preferring to NUDGE users and rollout policies with MDM.
    – Andrew
    Sep 24, 2021 at 18:45
1

As documented in the man page you need to use sudo to actually install software via softwareupdate. So in your case it's

sudo /usr/sbin/softwareupdate -i "macOS Catalina 10.15.7 Update"

to install 10.15.7, or

sudo /usr/sbin/softwareupdate -ia

to install all available updates.

9
  • I am interested to install a specific update. Feb 26, 2021 at 18:56
  • But .. I can't find a working solution and will give this a roll anyways.. Feb 26, 2021 at 18:59
  • @StephenBoesch You only seem to have one pending so it doesn't matter. But try with sudo and the label macOS Catalina 10.15.7 Update.
    – nohillside
    Feb 26, 2021 at 18:59
  • 1
    I wouldn't be surprised if the CLI version only requests the delta. See your other question, get the combo.
    – Tetsujin
    Feb 26, 2021 at 19:19
  • 1
    I regret to inform you that in Big Sur, softwareupdate is not allowed to install system updates, although it apparently can do others. It will download it. It will reboot. But it will not actually install. I found this out the hard way. (That may only be for Apple Silicon Macs, I'm not 100% sure and google was no help. Everyone is talking about --ignore being deprecated so the search results are full of that.)
    – TJ Luoma
    Feb 26, 2021 at 23:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .