Category filter
Script to turn on/off Auto Updates in App Store for Mac
IT administrators may choose to disable auto-updates from the App Store for various reasons, such as when storage space is already limited, particularly to prevent the installation of updates for less essential applications. This includes avoiding updates for apps that are experiencing bugs or issues, and postponing updates until a stable internet connection is available. However, this action becomes more difficult as the number of devices increases. In such situations, Hexnode allows you to remotely run a script to turn on/off auto updates in the App Store, providing a hands-free solution for device admins. The script can be executed remotely using the Execute Custom Script action.
Bash script to disable Auto Updates in the App Store
1 2 3 |
#!/bin/bash sudo defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdate -bool FALSE exit 0 |
- sudo – is an abbreviation of “super user do” and is a Linux command that allows programs to be executed as a super user (aka root user) or another user.
- defaults – lets you read, write, and delete user preferences from the command line.
- AutoUpdate – is the macOS Terminal equivalent of the option,
- The boolean operator false is used here to turn off the Install app updates from the App Store/Install application updates from the App Store option.
For macOS version 13.0 and below:
Install app updates from the App Store in Advanced Settings under System Preferences > Software Update.
For macOS version 13.0 and above:
Install application updates from the App Store located within the information (info) icon in the Automatic Updates section under System Settings > Software Update.
Bash script to enable Auto Updates in the App Store
1 2 3 |
#!/bin/bash sudo defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdate -bool TRUE exit 0 |
- The boolean operator true is used here to turn on the Install app updates from the App Store/Install application updates from the App Store option.