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.

Disclaimer:


The sample scripts provided below are adapted from third-party open-source sites.

Bash script to disable Auto Updates in the 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,
  • 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.

  • 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.

Turn off the option to install app updates from the App Store

Bash script to enable Auto Updates in the App Store

  • 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.

Turn on the option to install app updates from the App Store

Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • The script takes effect after restarting the targeted devices. Check out this script to schedule restart on a Mac through the Hexnode console/portal.For an immediate restart, utilize the remote action restart device.
  • Hexnode will not be responsible for any damage/loss to the system on the behaviour of the script.

  • Sample Script Repository