Category filter
Script to turn on/off Auto Updates in App Store for Mac
Enabling/Disabling Automatic updates in App Store requires the user to manually configure the required option in Advanced Settings under System Preferences > Software Update. However, this action becomes more difficult as the number of devices increases. In such situations, the Execute Custom Script action in the Hexnode portal can be utilized, where you can run customized scripts directly from the UEM console.
Bash Script to disable Auto Updates in App Store
1 2 3 4 5 |
#!/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 in System Preferences > Software Update > Advanced, which turns on/off the Install app updates from the App Store option.
- The boolean operator false is used here to disable the Auto Update option.
Bash Script to enable Auto Updates in App Store
1 2 3 4 5 |
#!/bin/bash sudo defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdate -bool TRUE exit 0 |
- The boolean operator true is used here to enable the Auto Update option.
Need more help?