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.


The Sample Scripts provided below are adapted from third-party Open-Source sites.

Bash Script to disable Auto Updates in App Store

  • 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

  • The boolean operator true is used here to enable the Auto Update option.

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository