Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marksharrison/4c9de16830e00aaf7ddf to your computer and use it in GitHub Desktop.
Save marksharrison/4c9de16830e00aaf7ddf to your computer and use it in GitHub Desktop.
Enable Mac App Store Auto Updates
# Enable Mac App Store Auto Updates
# Quit System Preferences app
osascript -e "tell application \"System Preferences\" to quit"
# Disable softwareupdate as workaround for defaults cache breaking
sudo softwareupdate --schedule off
# Automatically check for updates
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticCheckEnabled -bool True
# Download newly available updates in background
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticDownload -bool True
# Install OS X updates
sudo defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdateRestartRequired -bool True
# Install app updates
sudo defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdate -bool True
# Install system data files and security updates
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist CriticalUpdateInstall -bool True
# Automatically download apps purchased on other Macs
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist ConfigDataInstall -bool True
# Enable softwareupdate
sudo softwareupdate --schedule on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment