Is there a way to check softwareupdate settings in Terminal?

Is there a way to use Terminal to check the settings for softwareupdate?


(I did a man softwareupdate in Terminal but there is no info there about any prefs.)


In System Preferences > Software Update there are settings for the following:

  • Automatically keep my Mac up to date
  • Check for updates
  • Download new updates when available
  • Install macOS updates
  • Install app updates from the App Store
  • Install system data files and security updates


I would like to verify those settings via Terminal.

iMac (2017 – 2020)

Posted on Jan 24, 2024 10:26 AM

Reply

Similar questions

5 replies

Jan 24, 2024 10:53 AM in response to MartinR

You could probably get it from the "defaults" command, but this particular data is really tricky. It is stored in /Library/Preferences/com.apple.SoftwareUpdate.plist, so you could use "defaults read /Library/Preferences/com.apple.SoftwareUpdate.plist". But most of the interesting keys are missing unless they are disabled.


For example, I have only ever configured my computers for "check for updates" and "security updates only", as displayed like so in Ventura:



Since technically I've only turned off one default option, the only interesting key in that preferences file is:


AutomaticDownload = 0;


If I had ever turned off (and maybe back on) "Check for updates", then I would look for a "AutomaticCheckEnabled" key. If I he'd disabled the security updates, I would look for the keys "ConfigDataInstall" and/or "CriticalUpdateInstall" set to 0.


But you're wasting your time. Apparently, none of this really matters.


Now this same key read from the user domain looks much more interesting:


defaults read com.apple.SoftwareUpdate


{

    MajorOSUserNotificationDate = "2024-01-19 21:21:40 +0000";

    UserNotificationDate = "2024-01-23 18:16:22 +0000";

}


Could I keep resetting this to be the current day and possibly avoid any future notification and/or unwanted upgrade?

Jan 25, 2024 7:33 AM in response to MartinR

MartinR wrote:

I have seen reports of people doing this to delay checking for updates. Apparently the maximum time limit is 90 days, so you would in fact have to keep resetting this.

I can do that with a launch agent.


I just need to reset these values:


defaults read com.apple.SoftwareUpdate

{

    MajorOSUserNotificationDate = "2024-01-19 21:21:40 +0000";

    UserNotificationDate = "2024-01-23 18:16:22 +0000";

}


I'm just lucky that my Ventura machine made it through. I've seen some people report Ventura machines getting force upgraded. Perhaps because this is a 2023 machine, Apple allows me some kind of grace period that I didn't get on the 2021 computer.

Jan 25, 2024 6:27 AM in response to VikingOSX

VikingOSX wrote:

which opens the Software Update panel in Settings : General : Software Update on Sonoma 14.3.


Thanks for the suggestion. But what I want to do is verify (and/or set) software update prefs via the Terminal, not via the Software Update panel. I'm trying to figure out if the problem lies in the panel not actually updating the preferences.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Is there a way to check softwareupdate settings in Terminal?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.