Category filter
Script to disable automatic download of OS updates on Mac
macOS devices can be configured to perform automatic checks for OS updates, ensuring that the latest OS updates from Apple are downloaded and installed seamlessly. To ensure compatibility of the software used by the organization with the new OS updates, administrators may prefer to verify them before updating the end-user devices. In such cases, the automatic download and installation of new OS updates can be disabled by executing scripts using the Execute Custom Script action.
Scripting language – Bash
File extension – .sh
Disable automatic download of OS updates
1 2 |
#!/bin/bash defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticDownload -boolean false |
The ‘defaults write’ command uses the preference file
The ‘AutomaticDownload’ key controls whether the automatic downloading of software updates should be enabled or disabled. Setting it to ‘-boolean false’ disables automatic downloads.
This will disable the automatic download of new OS updates. However, the user will still receive notifications in case new updates are available.
Disable automatic check for OS updates
If you would like to prevent the device from automatically checking for new updates, you can deploy the following script.
1 2 |
#!/bin/bash defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -boolean false |
The ‘AutomaticCheckEnabled’ key determines whether the device automatically checks for software updates. Setting it to ‘-boolean false’ disables automatic scans for new updates.
If the System Preferences/Settings is kept open on the device when the script is executed from the portal, you may have to exit and open the System Preferences/Settings again for the script to take effect.