Disable macOS Upgrade Notifications

Our users have been receiving daily notifications to upgrade to macOS Mojave lately. Auto updates have already been turned off for all clients and we’re not quite ready to start deploying OS upgrades due to vendor compatibility.

It turns out that this notification bundle gets downloaded separately from an actual OS upgrade. We’ll need to ignore the item macOSInstallerNotification_GM along with OS installers in softwareupdate.

However, once the item has already been downloaded and starts to display the notification for the user, we’ll have to remove it from /Library/Bundles/OSXNotification.bundle.

Additionally, there’s a plist that keeps track of the user’s dismissal count at /Library/Preferences/com.apple.noticeboard.plist. We’ll need to add the max dismissal count of 4 manually.

Lastly, once we do start upgrading clients, we’ll push out a config profile that will suppress the Welcome to macOS Mojave quick tour notification.

Our finished script can look something like this:

#!/bin/bash

# turn off all app store updates
defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticCheckEnabled -bool false
defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticDownload -bool false
defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist ConfigDataInstall -bool false
defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist CriticalUpdateInstall -bool false
defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdate -bool false
defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdateRestartRequired -bool false

# reset ignored updates
softwareupdate --reset-ignored

# ignore os upgrades
softwareupdate --ignore 'macOSInstallerNotification_GM'
softwareupdate --ignore 'macOS High Sierra 10.13'
softwareupdate --ignore 'Install macOS High Sierra'
softwareupdate --ignore 'macOS Mojave 10.14'
softwareupdate --ignore 'Install macOS Mojave'

# remove upgrade notification bundle
if [[ -d /Library/Bundles/OSXNotification.bundle ]]; then
rm -rf /Library/Bundles/OSXNotification.bundle
fi

# remove existing noticeboard
if [[ -e /Library/Preferences/com.apple.noticeboard.plist ]]; then
rm -f /Library/Preferences/com.apple.noticeboard.plist
fi

# set noticeboard for high sierra
defaults write /Library/Preferences/com.apple.noticeboard.plist LastNoticeboardCatalogCheck "$(date -u "+%F %T %z")"
defaults write /Library/Preferences/com.apple.noticeboard.plist "com.apple.noticeboard.notification.highsierra.1.0" -dict dismissalCount 4 lastDismissedDate "$(date -u "+%F %T %z")"
defaults write /Library/Preferences/com.apple.noticeboard.plist identifiers -array "com.apple.noticeboard.notification.highsierra.1.0"

# set noticeboard for mojave
defaults write /Library/Preferences/com.apple.noticeboard.plist LastNoticeboardCatalogCheck "$(date -u "+%F %T %z")"
defaults write /Library/Preferences/com.apple.noticeboard.plist "com.apple.noticeboard.notification.mojave.2.0" -dict dismissalCount 4 lastDismissedDate "$(date -u "+%F %T %z")"
PlistBuddy -c "Add identifiers:1 string com.apple.noticeboard.notification.mojave.2.0" /Library/Preferences/com.apple.noticeboard.plist

# install macos tour profile
os_vers=$(sw_vers -productVersion | cut -d '.' -f2)
if [[ $os_vers -ge '13' ]]; then
profiles install -path /private/tmp/macOS_Tour_OS.mobileconfig
else
profiles -I -F /private/tmp/macOS_Tour_OS.mobileconfig
fi
rm -f /private/tmp/macOS_Tour_OS.mobileconfig

exit 0

The configuration profile will be:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadDescription</key>
<string>Included custom settings:
com.apple.touristd</string>
<key>PayloadDisplayName</key>
<string>Managed: OS Tour Notification</string>
<key>PayloadEnabled</key>
<true/>
<key>PayloadIdentifier</key>
<string>com.apple.touristd.disable</string>
<key>PayloadOrganization</key>
<string></string>
<key>PayloadRemovalDisallowed</key>
<true/>
<key>PayloadScope</key>
<string>System</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>372e2e5c-1dc6-11e9-ab14-d663bd873d93</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadEnabled</key>
<true/>
<key>PayloadIdentifier</key>
<string>com.apple.touristd.disable.1013</string>
<key>PayloadType</key>
<string>com.apple.ManagedClient.preferences</string>
<key>PayloadUUID</key>
<string>372e3244-1dc6-11e9-ab14-d663bd873d93</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadContent</key>
<dict>
<key>com.apple.touristd</key>
<dict>
<key>Forced</key>
<array>
<dict>
<key>mcx_preference_settings</key>
<dict>
<key>firstOSLogin</key>
<date>2017-09-28T03:31:23Z</date>
<key>seed-notificationDueDate-f/Pn3F4RScOh+GUBKO9sRA</key>
<date>2017-09-28T07:31:23Z</date>
<key>seed-numNotifications-+trJt2VsTvK1yfPGwOySDw</key>
<string>0</string>
<key>seed-numNotifications-ETJeJ9/1QmmWUde7uK8fDg</key>
<string>0</string>
<key>seed-numNotifications-KwUoo0fRRM2VPmIm0V67xg</key>
<string>0</string>
<key>seed-numNotifications-LR2P9+rnQ2q9xSUy1ZgWOw</key>
<string>0</string>
<key>seed-numNotifications-MM3ne3nTR9eXFyVwZ5gN7Q</key>
<string>0</string>
<key>seed-numNotifications-b/dLke8ZTQaN9KKrxfwDQw</key>
<string>0</string>
<key>seed-numNotifications-f/Pn3F4RScOh+GUBKO9sRA</key>
<string>1</string>
<key>seed-numNotifications-lEDfW5O+SZe8KTQ93HGOPA</key>
<string>0</string>
<key>seed-viewed-f/Pn3F4RScOh+GUBKO9sRA</key>
<date>2017-09-28T03:31:46Z</date>
</dict>
</dict>
</array>
</dict>
</dict>
</dict>
<dict>
<key>PayloadEnabled</key>
<true/>
<key>PayloadIdentifier</key>
<string>com.apple.touristd.disable.1014</string>
<key>PayloadType</key>
<string>com.apple.ManagedClient.preferences</string>
<key>PayloadUUID</key>
<string>372e3370-1dc6-11e9-ab14-d663bd873d93</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadContent</key>
<dict>
<key>com.apple.touristd</key>
<dict>
<key>Forced</key>
<array>
<dict>
<key>mcx_preference_settings</key>
<dict>
<key>seed-notificationDueDate-krdWS8DSQIqJSqQFXW1/pw</key>
<date>2018-07-29T21:03:39Z</date>
<key>seed-notificationDueDate-lQlm1yrMS0GPVyAL44id+A</key>
<date>2018-07-29T21:03:39Z</date>
<key>seed-numNotifications-+trJt2VsTvK1yfPGwOySDw</key>
<string>0</string>
<key>seed-numNotifications-/+vP78HsSh+Yeb4xJnUT9A</key>
<string>0</string>
<key>seed-numNotifications-2+LvxAVyT6qnV1sDMZT0NA</key>
<string>0</string>
<key>seed-numNotifications-APhNaYV1RxSS41lC7ZJJ9Q</key>
<string>0</string>
<key>seed-numNotifications-B70mVuHeT0WUgKh/VdUuZQ</key>
<string>0</string>
<key>seed-numNotifications-ETJeJ9/1QmmWUde7uK8fDg</key>
<string>0</string>
<key>seed-numNotifications-EWfaSdJwR/6f1BYGiyLpcQ</key>
<string>0</string>
<key>seed-numNotifications-FQrkbNP9ThKQQtpqx2saFg</key>
<string>0</string>
<key>seed-numNotifications-GZAJdmpdSqmfH2PkCr8ebw</key>
<string>0</string>
<key>seed-numNotifications-JTecrrXDSVut2tSfltty9Q</key>
<string>0</string>
<key>seed-numNotifications-KwUoo0fRRM2VPmIm0V67xg</key>
<string>0</string>
<key>seed-numNotifications-LR2P9+rnQ2q9xSUy1ZgWOw</key>
<string>0</string>
<key>seed-numNotifications-MM3ne3nTR9eXFyVwZ5gN7Q</key>
<string>0</string>
<key>seed-numNotifications-Pa88nesPSO6POlutVN4/Sg</key>
<string>0</string>
<key>seed-numNotifications-SdV08ZZQRxOCWq6JBEXmfg</key>
<string>0</string>
<key>seed-numNotifications-UhiR1M79RWmXLIQr4M0AWw</key>
<string>0</string>
<key>seed-numNotifications-WEyaCPMVRB6HbnmRq9EnNQ</key>
<string>0</string>
<key>seed-numNotifications-b/dLke8ZTQaN9KKrxfwDQw</key>
<string>0</string>
<key>seed-numNotifications-d+gfl8CNTNeauANKjf9WqA</key>
<string>0</string>
<key>seed-numNotifications-f/Pn3F4RScOh+GUBKO9sRA</key>
<string>0</string>
<key>seed-numNotifications-krdWS8DSQIqJSqQFXW1/pw</key>
<string>2</string>
<key>seed-numNotifications-kti4ZkMKQFyCL2kbgCY23A</key>
<string>0</string>
<key>seed-numNotifications-lEDfW5O+SZe8KTQ93HGOPA</key>
<string>0</string>
<key>seed-numNotifications-n87FVu1TSwGzble8vqBvsg</key>
<string>0</string>
<key>seed-viewed-krdWS8DSQIqJSqQFXW1/pw</key>
<date>2018-07-28T21:03:44Z</date>
<key>seed-viewed-lQlm1yrMS0GPVyAL44id+A</key>
<date>2018-07-28T21:03:44Z</date>
</dict>
</dict>
</array>
</dict>
</dict>
</dict>
</array>
</dict>
</plist>

Once in place, the ‘quick tour’ notification should be ignored automatically.