- Disable SIP in recovery mode
$ csrutil disable
and reboot.
- Add services you want to disable to
/System/Library/Sandbox/com.apple.xpc.launchd.rootless.plist.
For example, if you want to disable 'apsd', do the following:
$ sudo nano /System/Library/Sandbox/com.apple.xpc.launchd.rootless.plist
Add key(s) at bottom:
com.apple.apsd
- Unload agents and daemons previously added to the whitelist
$ launchctl unload -w
or $ sudo launchctl unload -w
For example:
$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.apsd.plist
- Reboot on recovery mode and enable SIP again with
$ csrutil enable
.
- Reboot again and agents and daemons will be unloaded with SIP enabled.
If you don't do the above, when you enable SIP again, the services will reload even if you unloaded them.
Some services I have disabled:
<key>com.apple.Safari.SafeBrowsing.Service.plist</key>
<true/>
<key>com.apple.SafariBookmarksSyncAgent.plist</key>
<true/>
<key>com.apple.SafariCloudHistoryPushAgent.plist</key>
<true/>
<key>com.apple.SafariHistoryServiceAgent.plist</key>
<true/>
<key>com.apple.SafariLaunchAgent.plist</key>
<true/>
<key>com.apple.SafariNotificationAgent.plist</key>
<true/>
<key>com.apple.SafariPlugInUpdateNotifier.plist</key>
<true/>
<key>com.apple.safaridavclient.plist</key>
<true/>
<key>com.apple.Safari.SafeBrowsing.Service.plist</key>
<true/>
<key>com.apple.SafariBookmarksSyncAgent.plist</key>
<true/>
<key>com.apple.SafariCloudHistoryPushAgent.plist</key>
<true/>
<key>com.apple.SafariHistoryServiceAgent.plist</key>
<true/>
<key>com.apple.SafariLaunchAgent.plist</key>
<true/>
<key>com.apple.SafariNotificationAgent.plist</key>
<true/>
<key>com.apple.SafariPlugInUpdateNotifier.plist</key>
<true/>
<key>com.apple.safaridavclient.plist</key>
<true/>
<key>com.apple.ReportCrash.Self.plist</key>
<true/>
<key>com.apple.ReportCrash.plist</key>
<true/>
<key>com.apple.CrashReporterSupportHelper.plist</key>
<true/>
<key>com.apple.ReportCrash.Root.Self.plist</key>
<true/>
<key>com.apple.ReportCrash.Root.plist</key>
<true/>
<key>com.apple.PhotoLibraryMigrationUtility.XPC.plist</key>
<true/>
<key>com.apple.cloudphotosd.plist</key>
<true/>
<key>com.apple.photoanalysisd.plist</key>
<true/>
<key>com.apple.photolibraryd.plist</key>
<true/>
<key>com.apple.DiagnosticReportCleanup.plist</key>
<true/>
<key>com.apple.diagnostics_agent.plist</key>
<true/>
<key>com.apple.InstallerDiagnostics.installerdiagd.plist</key>
<true/>
<key>com.apple.InstallerDiagnostics.installerdiagwatcher.plist</key>
<true/>
<key>com.apple.diagnosticd.plist</key>
<true/>
<key>com.apple.diagnosticextensions.osx.bluetooth.helper.plist</key>
<true/>
<key>com.apple.diagnosticextensions.osx.getmobilityinfo.helper.plist</key>
<true/>
<key>com.apple.diagnosticextensions.osx.spotlight.helper.plist</key>
<true/>
<key>com.apple.diagnosticextensions.osx.timemachine.helper.plist</key>
<true/>
<key>com.apple.diagnosticextensions.osx.wifi.helper.plist</key>
<true/>
<key>com.apple.gamed.plist</key>
<true/>
<key>com.apple.GameController.gamecontrollerd.plist</key>
<true/>
<key>com.apple.spindump_agent.plist</key>
<true/>
<key>com.apple.metadata.mds.spindump.plist</key>
<true/>
<key>com.apple.spindump.plist</key>
<true/>
<key>com.apple.Siri.agent.plist</key>
<true/>
<key>com.apple.siriknowledged.plist</key>
<true/>