Disable Automatic Updates
There is no single dialogue box that strikes fear into systems administrators like a user being prompted to update their own software. Whether it’s the Mac OS itself, Adobe’s Creative Suite, or Microsoft’s Office products, updates have a history of breaking almost as many things as they solve.
If you’re in charge of your Macintosh network, have locked down administrative rights on your machines and managed client preferences through Open Directory, these automatic update notices may not be a concern. If, on the other hand, you’re not supposed to touch anyone’s precious machine until suddenly it’s broken, the ability to simply turn off automatic update notification could mean happier much users and a lot less stress for you.
The bad news is that every software vendor seems to have a different mechanism to store their update preferences. The good news is that you should be able to adapt the examples below to almost any application. These commands can be pushed out to every machine on your network via Apple Remote Desktop, or rolled into a complete shell script for deployment with tools like JAMF Casper Suite and LANrev.
Disable Apple Software Update:
The simplest update notification to turn off is Apple’s own Software Update. It’s also the most important. While problems with a third-party update might destabilize a single product, problems with Apple updates could cause issues with any or all your applications. Fortunately, the Software Update system preference is just the front-end to the softwareupdate command. As such, you can disable your own update notifications for Apple products in the Terminal by typing:
softwareupdate --schedule off
For whatever reason, though, this setting isn’t followed system-wide. Instead, it’s a user-level preference, meaning that turning off updates as the administrator doesn’t disable them for other accounts. Instead, we’re forced to write a more complex script to run the command as each user individually:
for USER in `ls -1 /Users | \
sed -e '/Shared/d' -e '/Deleted Users/d' -e '/.localized/d'`; \
do; \
sudo -u $USER softwareupdate --schedule off; \
done
The first line uses the ls command to get a list of all the directories in /Users. The second uses sed to remove the standard non-user directories from that list. The final line uses sudo to let you run the softwareupdate command masquerading as all the other users on a machine.
Disable Microsoft Office 2008 AutoUpdate:
Although Microsoft has a reputation for creating its own standards, Office 2008 follows Apple’s .plist format to store it’s preferences. For this reason, we can use the defaults command to change the Office AutoUpdate settings:
defaults write com.microsoft.autoupdate2 HowToCheck -string "Manual"
In the event that the AutoUpdate preferences are set to “Automatic”, this command will change the setting to “Manual” in the com.microsoft.autoupdate2.plist file for that user. We can use the same loop we created above for this command as well, disabling automatic checking like so:
for USER in `ls -1 /Users | \
sed -e '/Shared/d' -e '/Deleted Users/d' -e '/.localized/d'`; \
do; \
sudo -u $USER defaults write com.microsoft.autoupdate2 \
HowToCheck -string "Manual"; \
done
Because we’re just writing to a .plist, this technique can be the basis for adjusting any application that uses Apple’s preference file format.
Disable Adobe CS4 Updater:
Adobe, on the other hand, doesn’t follow anyone’s rules. Although their Updater preferences are stored in an XML file, it isn’t one any standard Apple commands can read. Instead, you can treat it like any other text file, finding the string that contains the update settings and substitute another string for it in place with sed:
sed -i "" 's:<AutoCheck>1</AutoCheck>:<AutoCheck>0</AutoCheck>:' \
~/Library/Application\ Support/Adobe/Updater5/AdobeUpdaterPrefs.dat
In this case, we’re just searching for the “AutoCheck” tag in the AdobeUpdaterPrefs file, and changing the value of 1 (enabled) to a value of 0 for this user. Just like the other settings above, we can change this for all users on a machine with a similar “for” loop:
for USER in `ls -1 /Users | \
sed -e '/Shared/d' -e '/Deleted Users/d' -e '/.localized/d'`; \
do; \
sed -i "" 's:<AutoCheck>1</AutoCheck>:<AutoCheck>0</AutoCheck>:' \
Users/$USER/Library/Application\ Support/Adobe/\
Updater5/AdobeUpdaterPrefs.dat; \
done
With these tools you can not only disable software updates for the major Mac applications, but with a little work you can use them to change a wide range of settings across the Macintosh platform.
Shameless Self-Promotion: Since laziness is a virtue when it comes to systems administration, we’ve packaged these commands (plus ones for CS3 and Office 2004) into one easy script on our new Downloads page. Please grab a copy, and make us feel all important.
