3

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 ?

2 Answers2

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.

nohillside
  • 100,768
  • I am interested to install a specific update. – WestCoastProjects Feb 26 '21 at 18:56
  • But .. I can't find a working solution and will give this a roll anyways.. – WestCoastProjects Feb 26 '21 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 '21 at 18:59
  • Too late "Cannot cancel updates after installation has started." ;) – WestCoastProjects Feb 26 '21 at 19:02
  • fyi after shutdown and restart the update did not work. I am way out of time to deal with this and will bite the bullet to upgrade to Big Sur. – WestCoastProjects Feb 26 '21 at 19:14
  • 1
    I wouldn't be surprised if the CLI version only requests the delta. See your other question, get the combo. – Tetsujin Feb 26 '21 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 '21 at 23:42
  • @TJLuoma It took way too much Googling to find this out. Thank you. – Kevin Hernandez Jul 15 '21 at 01:58
  • @KevinHernandez it's such a dumb decision / change my Apple. I don't understand it at all. Makes no sense at all… and pretending to do it (and then fail) is definitely the worst way to no longer support this. Just so dumb. – TJ Luoma Jul 16 '21 at 02:53
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.

Andrew
  • 134
  • 3
  • 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 – WestCoastProjects Sep 24 '21 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 '21 at 18:45