Skip to content

Instantly share code, notes, and snippets.

@crowjdh
Last active November 22, 2022 08:10
Show Gist options
  • Save crowjdh/0f4828c7314810170e5baa88388b879f to your computer and use it in GitHub Desktop.
Save crowjdh/0f4828c7314810170e5baa88388b879f to your computer and use it in GitHub Desktop.
Sometimes you just really want BigSur to just shut the fu*k up.

Prerequisite

  • Disable auto update check from System Preferences -> Software Update
  • Dismiss update notification

Disable Apple Software Update Domain

  • Add entries below to /etc/hosts
    127.0.0.1 swscan.apple.com
    127.0.0.1 swcdn.apple.com
    127.0.0.1 swdist.apple.com

Remove System Preferences Badge

defaults write \
  com.apple.systempreferences \
  AttentionPrefBundleIDs \
  '{ "com.apple.preferences.softwareupdate" = 0; }'

killall Dock

Update Next Update Date

SCHED_DATE="Fri Jan 01 07:00:00 KST 2100"
/usr/libexec/PlistBuddy \
  -c "Set :AbsoluteSchedule:com.apple.SoftwareUpdate:SUCheckSchedulerTag:Timer:date $SCHED_DATE" \
  /Users/$USER/Library/Preferences/com.apple.scheduler.plist

Increase Update Interval

/usr/libexec/PlistBuddy \
  -c "Set :AbsoluteSchedule:com.apple.SoftwareUpdate:SUCheckSchedulerTag:Timer:repeatInterval 449280000" \
  /Users/$USER/Library/Preferences/com.apple.scheduler.plist

(Optional) Nuke Option

You might have to disable SoftwareUpdateNotificationManager from being executed in the first place depending on the security update you've installed

  • Boot into recovery mode by pressing ⌘ + r after bootup sound and before apple logo show up
  • Open Terminal and remove e[x]ecute flag from SoftwareUpdateNotificationManager binary:
    cd /Volumes/Macintosh\ HD/System/Library/PrivateFrameworks/SoftwareUpdate.framework/Versions/A/Resources/SoftwareUpdateNotificationManager.app/Contents/MacOS/
    chmod 644 SoftwareUpdateNotificationManager
  • Reboot normally

Reboot

  • Now.

Check

/usr/libexec/PlistBuddy \
  -c "Print :AbsoluteSchedule:com.apple.SoftwareUpdate:SUCheckSchedulerTag:Timer" \
  /Users/$USER/Library/Preferences/com.apple.scheduler.plist

Whenever You Want to Feel Safe

  • Re-enable SW update domain
  • Check and update security updates manually
    softwareupdate -l
    sudo softwareupdate --install [SW_UPDATE_LABEL]
  • Redo previous steps

References

Food for Thought

/System/Library/LaunchAgents
- com.apple.MobileAccessoryUpdater.fudHelperAgent.plist
- com.apple.SoftwareUpdateNotificationManager.plist

to

/System/Library/LaunchAgentsIgnored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment