Quantcast
Channel: rtrouton – Der Flounder
Viewing all articles
Browse latest Browse all 764

Enabling automatic macOS software updates for OS X Yosemite through macOS Mojave

$
0
0

A while back, I wrote a post on how to enable automatic OS X updates on OS X Yosemite. The methods used to enable automatic macOS updates changed as of macOS Mojave, so let’s take a look at the changes. For more details, please see below the jump.

The main change is that the option to enable automatic macOS updates has moved from the com.apple.commerce preference domain to the com.apple.SoftwareUpdate preference domain. On OS X Yosemite through macOS High Sierra, the following command can be run with root privileges to enable OS X and macOS updates to be installed automatically:

defaults write /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -bool true

Screen Shot 2018-12-28 at 4.45.06 PM

When this command is run, the following checkbox should be checked in the App Store preferences in System Preferences.

For Yosemite and El Capitan:

  • Install OS X updates

Screen Shot 2018 12 28 at 5 19 38 PM

For Sierra and High Sierra:

  • Install macOS updates

Screen Shot 2018 12 28 at 4 44 02 PM

As of macOS Mojave, the following command can be run with root privileges to enable macOS updates to be installed automatically:

defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticallyInstallMacOSUpdates -bool true

Screen Shot 2018-12-28 at 3.56.42 PM

When this command is run, the following checkbox should be checked in the Software Update preferences in System Preferences.

  • Install macOS updates

Screen Shot 2018 12 28 at 3 56 59 PM

In both cases, the Mac will check for new updates overnight and install them when the Mac is idle. If a reboot is needed as part of installing an update, the Mac will reboot automatically.

If the Mac is not idle and a reboot is needed, a notification will appear to the logged-in user asking permission to reboot.

On OS X Yosemite through macOS High Sierra, the notification should look similar to this:

Screen Shot 2018 01 10 at 10 20 47 AM

On macOS Mojave, the notification should look similar to this:

MacOS Mojave Software Update 003

Unfortunately, it is not yet possible to set these automatic update settings using a profile. The com.apple.commerce preference domain can’t be managed by a profile and the AutomaticallyInstallMacOSUpdates setting in the com.apple.SoftwareUpdate preference domain should be manageable with a profile, but for unknown reasons, it can’t be.

In place of a profile, I’ve written a script to set up automatic OS X / macOS updates for OS X Yosemite through macOS Mojave. This script enables the following options:

  • Automatic background check for macOS software updates
  • Automatic download of macOS software updates
  • Automatic download and installation of XProtect, MRT and Gatekeeper updates
  • Automatic download and installation of automatic security updates
  • Automatic installation of OS X / macOS updates for OS X Yosemite through macOS Mojave

The script is available below and also on GitHub at the following address:

https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/enable_automatic_apple_software_updates


Viewing all articles
Browse latest Browse all 764

Trending Articles