Unable to install an update via the softwareupdate command line tool

command linesoftware-update

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 ?

Best Answer

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.