To go along with the automatic installation of security updates, there are also options in Yosemite’s App Store preferences in System Preferences to have your Mac automatically install available updates for OS X and updates for applications from the Mac App Store. For more details, see below the jump.
Apple has published a KBase article that explains in general how the automatic updates work. The first time updates are available on your Mac, OS X will prompt you with the choice of turning on the Always Update option.
When the Always Update option is selected, the following options should show up as checked in the App Store preferences in System Preferences:
- Install app updates
- Install OS X updates
These options can also be selected by going into the App Store preferences in System Preferences and checking the correct checkboxes. When these options are checked in the App Store preferences, the Mac will check for new updates overnight and install them. If a reboot is needed as part of installing an update, the Mac will reboot automatically.
It’s possible to manage these settings by setting the correct values in /Library/Preferences/com.apple.commerce.plist. To enable app updates from the Mac App Store to be installed automatically, run the following command with root privileges:
defaults write /Library/Preferences/com.apple.commerce AutoUpdate -bool TRUE
To stop app updates from the Mac App Store from being installed automatically, run the following command with root privileges:
defaults write /Library/Preferences/com.apple.commerce AutoUpdate -bool FALSE
To enable OS X updates to be installed automatically, run the following command with root privileges:
defaults write /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -bool TRUE
To stop OS X updates from being installed automatically, run the following command with root privileges:
defaults write /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -bool FALSE
Because these values can be managed separately, it’s possible to set App Store updates updates to be installed automatically while allowing the user to decide when to install OS X updates. To enable this, run the following commands with root privileges:
defaults write /Library/Preferences/com.apple.commerce AutoUpdate -bool TRUE
defaults write /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -bool TRUE
In this scenario, the App Store preferences in System Preferences will have the Install app updates checkbox checked and the Install OS X updates checkbox unchecked.
One important thing to know about forcing automatic installation of app and OS X updates is that the Software Update function on the system in question must be set to automatically check for updates. Without the automatic checks, app and OS X updates will not automatically install.
To control the automatic update check using the softwareupdate command line tool, run the following commands with root privileges:
To enable the automatic update check:
softwareupdate --schedule on
To disable the automatic update check:
softwareupdate --schedule off
You can also manage this using the defaults command line tool. To enable the automatic update check using defaults, run the following command with root privileges:
defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -bool TRUE
To disable the automatic update check using defaults, run the following command with root privileges:
defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -bool FALSE