Skip to content

Instantly share code, notes, and snippets.

@gopsmith
Forked from b0gdanw/DisableBigSur.sh
Last active April 5, 2024 17:52
Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gopsmith/bf4d3a8203cd0792c9f8702cc76c8525 to your computer and use it in GitHub Desktop.
Save gopsmith/bf4d3a8203cd0792c9f8702cc76c8525 to your computer and use it in GitHub Desktop.
Disable Big Sur and Monterey services
#!/bin/zsh
# CREDITS: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Big Sur revision by b0gdanw https://gist.github.com/b0gdanw/40d000342dd1ba4d892ad0bdf03ae6ea
# TEMPORARILY disabling (e.g. STOPPING via 'bootout') unwanted services on macOS 11 Big Sur and macOS 12 Monterey:
# This version is for a special boot that optimizes for real-time music performance and streaming video.
# Due to the read-only system volume introduced with macOS Catalina, this script can NOT be run in Recovery mode's Terminal.
# For my purposes I leave WiFi enabled, for streaming video to a local router with no internet connection.
# SIP must first be disabled, in Recovery mode's Terminal (`csrutil disable`), then run this script after rebooting.
# To return to normal boot, simply re-enable SIP in Recovery mode's Terminal (`csrutil enable`), and reboot.
# If you want to fully disable the services, uncomment the `launchctl disable` lines, but remember that they will
# automatically launch again after you re-enable SIP.
# Big Sur GUI Agents to bootout
TODISABLE=( \
'com.apple.accessibility.MotionTrackingAgent' \
'com.apple.AMPArtworkAgent' \
'com.apple.AMPDeviceDiscoveryAgent' \
'com.apple.AMPDevicesAgent' \
'com.apple.AMPLibraryAgent' \
'com.apple.AMPSystemPlayerAgent' \
'com.apple.amsaccountsd' \
'com.apple.amsengagementd' \
'com.apple.AOSHeartbeat' \
'com.apple.AOSPushRelay' \
'com.apple.ap.adprivacyd' \
'com.apple.ap.adservicesd' \
'com.apple.ap.promotedcontentd' \
'com.apple.appleseed.seedusaged' \
'com.apple.applespell' \
'com.apple.appsleep' \
'com.apple.appstoreagent' \
'com.apple.appstorecomponentsd' \
'com.apple.assessmentagent' \
'com.apple.assistant_service' \
'com.apple.assistantd' \
'com.apple.AssistiveControl' \
'com.apple.avatarsd' \
'com.apple.bird' \
'com.apple.cache_delete' \
'com.apple.CalendarAgent' \
'com.apple.CallHistoryPluginHelper' \
'com.apple.CallHistorySyncHelper' \
'com.apple.cloudd' \
'com.apple.cloudpaird' \
'com.apple.cloudphotod' \
'com.apple.CommCenter' \
'com.apple.commerce' \
'com.apple.contacts.donation-agent' \
'com.apple.ContactsAgent' \
'com.apple.CoreLocationAgent' \
'com.apple.corespeechd' \
'com.apple.corespotlightd' \
'com.apple.corespotlightservice' \
'com.apple.DiagnosticReportCleanup.plist' \
'com.apple.DictationIM' \
'com.apple.email.maild' \
'com.apple.exchange.exchangesyncd' \
'com.apple.familycircled' \
'com.apple.familycontrols.useragent' \
'com.apple.familynotificationd' \
'com.apple.findmymacmessenger' \
'com.apple.followupd' \
'com.apple.FollowUpUI' \
'com.apple.GameController.gamecontrolleragentd' \
'com.apple.gamed' \
'com.apple.homed' \
'com.apple.icdd' \
'com.apple.icloud.findmydeviced.findmydevice-user-agent' \
'com.apple.icloud.fmfd' \
'com.apple.icloud.searchpartyuseragent' \
'com.apple.iCloudHelper' \
'com.apple.iCloudNotificationAgent' \
'com.apple.iCloudUserNotificationsd' \
'com.apple.imagent' \
'com.apple.imautomatichistorydeletionagent' \
'com.apple.imcore.imtransferagent' \
'com.apple.itunescloudd' \
'com.apple.knowledge-agent' \
'com.apple.ManagedClientAgent.agent' \
'com.apple.ManagedClientAgent.enrollagent' \
'com.apple.Maps.mapspushd' \
'com.apple.mediaanalysisd' \
'com.apple.mediaremoteagent' \
'com.apple.mediastream.mstreamd' \
'com.apple.MobileAccessoryUpdater.fudHelperAgent' \
'com.apple.newsd' \
'com.apple.notificationcenterui.agent' \
'com.apple.parentalcontrols.check' \
'com.apple.parsecd' \
'com.apple.parsec-fbf' \
'com.apple.passd' \
'com.apple.photoanalysisd' \
'com.apple.photolibraryd' \
'com.apple.PhotoLibraryMigrationUtility.XPC' \
'com.apple.protectedcloudstorage.protectedcloudkeysyncing' \
'com.apple.RapportUIAgent' \
'com.apple.remindd' \
'com.apple.RemoteDesktop.agent' \
'com.apple.RemoteManagementAgent' \
'com.apple.routined' \
'com.apple.Safari.PasswordBreachAgent' \
'com.apple.Safari.SafeBrowsing.Service' \
'com.apple.SafariBookmarksSyncAgent' \
'com.apple.SafariCloudHistoryPushAgent' \
'com.apple.SafariHistoryServiceAgent' \
'com.apple.SafariLaunchAgent' \
'com.apple.SafariNotificationAgent' \
'com.apple.screensharing.agent' \
'com.apple.screensharing.menuextra' \
'com.apple.screensharing.MessagesAgent' \
'com.apple.ScreenTimeAgent' \
'com.apple.SecureBackupDaemon' \
'com.apple.security.cloudkeychainproxy3' \
'com.apple.security.keychain-circle-notification' \
'com.apple.shazamd' \
'com.apple.sidecar-relay' \
'com.apple.Siri.agent' \
'com.apple.siriknowledged' \
'com.apple.SoftwareUpdateNotificationManager' \
'com.apple.speech.speechdatainstallerd' \
'com.apple.speech.synthesisserver' \
'com.apple.Spotlight' \
'com.apple.suggestd' \
'com.apple.syncdefaultsd' \
'com.apple.telephonyutilities.callservicesd' \
'com.apple.TMHelperAgent' \
'com.apple.TMHelperAgent.SetupOffer' \
'com.apple.UsageTrackingAgent' \
'com.apple.UserNotificationCenterAgent' \
'com.apple.videoconference.camera' \
'com.apple.videosubscriptionsd' \
'com.Arturia.ArturiaSoftwareCenterAgent' \
'com.avid.CloudClientServices' \
'com.avid.link' \
'com.avid.transport.client' \
'com.citrixonline.GoToMeeting.G2MUpdate' \
'com.dropbox.DropboxMacUpdate.agent' \
'com.github.facebook.watchman' \
'com.google.keystone.system.agent' \
'com.google.keystone.system.xpcservice' \
'com.logmein.GoToMeeting.G2MUpdate' \
'com.microsoft.OneDriveStandaloneUpdater' \
'com.microsoft.update.agent' \
'com.paceap.eden.licensed.agent' \
'com.skype.skype.shareagent' \
'com.techsmith.snagit.capturehelper2020' \
'homebrew.mxcl.chromedriver' \
'homebrew.mxcl.mongodb' \
'homebrew.mxcl.postgresql' \
'org.pqrs.karabiner.agent.karabiner_grabber' \
'org.pqrs.karabiner.agent.karabiner_observer' \
'org.pqrs.karabiner.karabiner_console_user_server' \
'org.pqrs.karabiner.karabiner_session_monitor' \
'org.pqrs.karabiner.NotificationWindow' \
)
echo ""
echo "*** BIG SUR GUI AGENTS ***"
for agent in "${TODISABLE[@]}"
do
{
echo "Booting out BIG SUR GUI Agent ${agent}"
sudo launchctl bootout gui/501/${agent}
#sudo launchctl disable gui/501/${agent}
} #&> /dev/null
done
#==================================================================================================
# Big Sur System Daemons to bootout
TODISABLE=( \
'com.apple.analyticsd' \
'com.apple.appleseed.fbahelperd' \
'com.apple.apsd' \
'com.apple.backupd' \
'com.apple.backupd-helper' \
'com.apple.cloudd' \
'com.apple.CommCenterRootHelper' \
'com.apple.eapolcfg_auth' \
'com.apple.familycontrols' \
'com.apple.findmymacd' \
'com.apple.findmymacmessenger' \
'com.apple.icloud.findmydeviced' \
'com.apple.icloud.searchpartyd' \
'com.apple.locationd' \
'com.apple.ManagedClient' \
'com.apple.ManagedClient.cloudconfigurationd' \
'com.apple.ManagedClient.enroll' \
'com.apple.ManagedClient.mechanism' \
'com.apple.mediaremoted' \
'com.apple.mobileassetd' \
'com.apple.netbiosd' \
'com.apple.preferences.timezone.admintool' \
'com.apple.remoted' \
'com.apple.RemoteDesktop.PrivilegeProxy' \
'com.apple.remotemanagementd' \
'com.apple.RemotePairTool' \
'com.apple.screensharing' \
'com.apple.security.FDERecoveryAgent' \
'com.apple.siri.acousticsignature' \
'com.apple.siri.morphunassetsupdaterd' \
'com.apple.siriinferenced' \
'com.apple.softwareupdate_firstrun_tasks' \
'com.apple.softwareupdated' \
'com.apple.SubmitDiagInfo' \
'com.apple.UserNotificationCenter' \
'com.barebones.authd' \
'com.bombich.ccchelper' \
'com.docker.vmnetd' \
'com.google.keystone.daemon' \
'com.microsoft.autoupdate.helper' \
'com.microsoft.office.licensingV2.helper' \
'com.microsoft.OneDriveStandaloneUpdaterDaemon' \
'com.microsoft.OneDriveUpdaterDaemon' \
'com.paceap.eden.licensed' \
'com.vidyo.DPA.VidyoCamera' \
'org.cups.cupsd' \
'org.pqrs.karabiner.karabiner_grabber' \
'org.pqrs.karabiner.karabiner_observer' \
'org.pqrs.Karabiner-DriverKit-VirtualHIDDeviceClient' \
)
echo ""
echo "*** BIG SUR SYSTEM DAEMONS ***"
for daemon in "${TODISABLE[@]}"
do
{
echo "Booting out BIG SUR Library Daemon ${daemon}"
sudo launchctl bootout system/${daemon}
#sudo launchctl disable system/${daemon}
} #&> /dev/null
done
#==================================================================================================
# Big Sur User Agents (1) to bootout
echo "Disabling geod"
sudo launchctl bootout user/205/com.apple.geod
#sudo launchctl disable user/205/com.apple.geod
@gopsmith
Copy link
Author

gopsmith commented May 17, 2022

# after running the main script, I also disable spotlight indexing:
sudo mdutil -i off -d / /System/Volumes/Data
# and turn off automatic software updates, manually (the script for this doesn't seem to work).
# I also kill some still-running processes, using `pgrep` and `pkill`

@elesto
Copy link

elesto commented May 19, 2022

Im confused to what this script is trying to accomplish. Is this really working for you? It includes bird (icloud and finder) and appsleep (sleep and power) among others which should throw many errors if disabled. Also, do you need to create a new snapshot for the modified volume when using launchctl disable?

@AlecKinnear
Copy link

Thanks @gopsmith This is a great attempt to bring Big Sur and Monterey under control. I'm willing to live without SIP if it means that I can shut down some of the incessant reporting to Apple and others and retain some privacy.

Yet I share some of @elesto's concerns. While I don't need iCloud, I do need sleep and power management to work. How many messages per minute is this configuration generating in the Console?

@al1gned
Copy link

al1gned commented Nov 14, 2022

Im confused to what this script is trying to accomplish. Is this really working for you? It includes bird (icloud and finder) and appsleep (sleep and power) among others which should throw many errors if disabled. Also, do you need to create a new snapshot for the modified volume when using launchctl disable?

Thank you for mentioning bird being responsible for icloudsync errors as I was having a fit, figuring it out as it was throwing out error popups everywhere and i don't even use icloud or have another apple device to sync it to. I also commented out appsleep, notificationcenterUiAgent just for the sake of usability.

I feel, it would have been a bit easier if this script mentioned what each of these services do just to make it easier to go back if something goes wrong or categorise them according to a specific usecase.

@gopsmith
Copy link
Author

gopsmith commented Nov 14, 2022

@elesto @AlecKinnear @svk-works I disable the above services for a very specific purpose: a real-time music and video performance, with NO internet access, and for a limited time (only for a few hours; when I’m done I re-enable SIP and all services are automatically restored). It works beautifully for my purposes. I do get a brief iCloud error the first time I open a Finder window, but I can ignore it. iCloud and other services need to be disabled because they are constantly trying to connect to their servers, which tends to disrupt my audio system, causing glitches and delays in reacting to MIDI events, and that’s a terrible experience when performing live music! You can comment out any of the above bootouts if you need those services.

@gopsmith
Copy link
Author

gopsmith commented Nov 14, 2022

it would have been a bit easier if this script mentioned what each of these services do

I agree, though I think most of the services have names that are pretty self-explanatory. As for the others, I did a lot of googling and the results were spotty - Apple apparently doesn’t feel the need to publicly document these things very well or consistently. The next time I have to update the script, I’ll leave some comments.

@al1gned
Copy link

al1gned commented Nov 14, 2022

it would have been a bit easier if this script mentioned what each of these services do

I agree, though I think most of the services have names that are pretty self-explanatory. As for the others, I did a lot of googling and the results were spotty - Apple apparently doesn’t feel the need to publicly document these things very well or consistently. The next time I have to update the script, I’ll leave some comments.

Do you happen to have any idea about biomesyncd suddenly using way too much cpu? Google-fu didn't help, and I'm pretty sure it started after the debloat.

Also, what would be the best way to go back to normal without resetting everything?

@gopsmith
Copy link
Author

gopsmith commented Nov 14, 2022

Do you happen to have any idea about biomesyncd suddenly using way too much cpu? Google-fu didn't help, and I'm pretty sure it started after the debloat.

I haven't had an issue with biomesyncd. You may want to add it to the above list. Have you seen this article?: https://discussions.apple.com/thread/253603115.

Also, what would be the best way to go back to normal without resetting everything?

Because I'm only using bootout commands, all services automatically get reset/relaunched whenever the system is rebooted. This is thanks to the read-only system volume. However, SIP is not automatically re-enabled; you have to do that manually.

@al1gned
Copy link

al1gned commented Nov 14, 2022

Have you seen this article?: https://discussions.apple.com/thread/253603115.

Oh yes, that discussion was one out of the only few relevant results but they did nothing. That process would start spinning up at random and take over all the power.

Because I'm only using bootout commands

About that, I did uncomment the disable commands too. I took a look inside the logs and saw a lot of invalid timezone messages so I enabled 'com.apple.preferences.timezone.admintool' and it does seem to have done the trick for now. I'll report if I find something else or maybe someone can find this important in the future.

@al1gned
Copy link

al1gned commented Nov 14, 2022

Nope, didn't help. It's back up again.

@AlecKinnear
Copy link

AlecKinnear commented Nov 18, 2022

Someone (me?) should go through this list and make a version with which users who would like Sleep to work but who can live and do live without iCloud. Personally I'd like to block the App Store (last main Apple service which I use), but can't do it as there are a few apps which I can't live without it and are App Store only.

If you can live without iCloud and App Store there's hope to keep Apple out of your business and clean up most of the completely unnecessary external connections. Personally, I could live without SIP if it makes it easier to retain control of my own computer and the data which goes in and out.

@5l1v3r1
Copy link

5l1v3r1 commented Jun 29, 2023

Well i ran the script on big sur and now the wifi cannot find any networks? How to reverse them?

@AlecKinnear
Copy link

Hi 5l1v3r1,

All instructions and information are in the readme and the comments to this gist. Go back to the previous version to read more comments. When Gordon wrote and shared this script, he did not agree to provide unlimited support to the reckless when they run this script without proper preparation.

Good luck.

@5l1v3r1
Copy link

5l1v3r1 commented Jun 29, 2023

@AlecKinnear
Well you are not helping by calling people "reckless" and yeah i just saw he added the part to disable the wifi and that's why i asked how to undo the script since the wifi cannot find any networks now. And that "https://gist.github.com/b0gdanw/40d000342dd1ba4d892ad0bdf03ae6ea" previous version DOES NOT GIVE ANY USEFUL INFORMATION about reversing it. The only part might be related as : "In Big Sur, there is no template in /System/Library/Templates/Data/private/var/db/com.apple.xpc.launchd/, just an empty folder named config.

The launchctl values are actually cached (print-cache & uncache https://ss64.com/osx/launchctl.html )
Maybe uncache should be included in the script after bootout and disable.
In my tests, any attempt to modify disabled.plist or disabled.501.plist in /private/var/db/com.apple.xpc.launchd/ by other means than launchctl (PlistBuddy or TextEdit for example) resulted in all modification being deleted and the files being returned to the original configuration. Same happens after deleting the files and rebooting.
So, that’s a quick way of correcting any misconfiguration." So i checked instead of that folder everything is written to /private/var/db/com.apple.xpc.launchd/ and totally cleared that folder. Since it cached, it recreates an empty disabled.plist after reboot but that did not help as well. So if you have knowledge, just comment, otherwise, let the others answer ok?

@gopsmith
Copy link
Author

@5l1v3r1 Apologies for any confusion. A couple of points here: 1) WiFi is not disabled, but internet access is disabled. As mentioned in the script comments, for my purposes I leave WiFi enabled, for streaming video to a local router and Apple TV (but with NO internet connection). 2) this script does not do anything permanent – the changes only last until the next boot. If you want to reverse it and go back to normal, simply reboot (and either leave SIP disabled, or re-enable it).

Please feel free to make a version of the script that does not disable internet access. For me it's important to have no internet services running, because anything that tries to access the network can cause dropouts in real-time audio, which is a bad thing to have happen when you're performing live music.

@AlecKinnear
Copy link

AlecKinnear commented Jun 30, 2023

@5l1v3r1 I'm weary of people who come to open source shared projects and demand answers. Particularly without carefully reading the documentation and existing comments/correspondence on the code in question.

What are you going to do? Stop using the script and demand a full refund? No worries, I've just sent your refund to your bank account. It should be there by tomorrow morning. Thanks for shopping open source!


@gopsmith Gordon, you have the patience of a saint. Thanks for the script. I'd suggest enhancing the documentation and directing users to the documentation for any existing issue.

@al1gned
Copy link

al1gned commented Jun 30, 2023

@AlecKinnear touch some grass, mah dude

@AlecKinnear
Copy link

Don't smoke, sorry. Wine, women and song.

@5l1v3r1
Copy link

5l1v3r1 commented Sep 15, 2023

@5l1v3r1 Apologies for any confusion. A couple of points here: 1) WiFi is not disabled, but internet access is disabled. As mentioned in the script comments, for my purposes I leave WiFi enabled, for streaming video to a local router and Apple TV (but with NO internet connection). 2) this script does not do anything permanent – the changes only last until the next boot. If you want to reverse it and go back to normal, simply reboot (and either leave SIP disabled, or re-enable it).

Please feel free to make a version of the script that does not disable internet access. For me it's important to have no internet services running, because anything that tries to access the network can cause dropouts in real-time audio, which is a bad thing to have happen when you're performing live music.

thanks man i already wrote another script based on this one and thank you for the proper explanation

@AlecKinnear get a life bro, seriously get a life

@AlecKinnear
Copy link

AlecKinnear commented Dec 15, 2023

@5l1v3r1 A

@AlecKinnear get a life bro, seriously get a life

I'm not your bro. I've got a couple of tasks for you. 1. Learn to write English. 2. read the documentation/issues before demanding answers from open-source coders.

Gordon has the patience of a saint for freeloaders, I don't.

@FabioFeher
Copy link

Hi.

I used High Sierra script successfully but I don't know how to do it on Big Sur.

Can anyone help with steps to run it?

I tried and faced "Permission denied" and "Boot-out failed: 3: No such process" messages.

@gopsmith
Copy link
Author

gopsmith commented Apr 5, 2024

I tried and faced "Permission denied" and "Boot-out failed: 3: No such process" messages.

Did ALL of bootouts result in the error messages? If so, I'm wondering if you followed the steps in the comments at the top, "SIP must first be disabled..."?

It's OK if you got a few "No such process" messages – some processes may not exist on your system.

@gopsmith
Copy link
Author

gopsmith commented Apr 5, 2024

Removed com.apple.rapportd from the bootouts – when booted out, screen mirroring (which I need for QLab video streaming to a projector) occasionally asks for a passcode and won't accept any input.

@FabioFeher
Copy link

I tried and faced "Permission denied" and "Boot-out failed: 3: No such process" messages.

Did ALL of bootouts result in the error messages? If so, I'm wondering if you followed the steps in the comments at the top, "SIP must first be disabled..."?

It's OK if you got a few "No such process" messages – some processes may not exist on your system.

SIP is disabled.

Must be in recovery mode to work?

@gopsmith
Copy link
Author

gopsmith commented Apr 5, 2024

Recovery mode is only used to disable SIP – you can't stay in recovery mode.

@FabioFeher
Copy link

Recovery mode is only used to disable SIP – you can't stay in recovery mode.

Can u help how to run script?

Thanks!

@gopsmith
Copy link
Author

gopsmith commented Apr 5, 2024

I was assuming that you did run the script. And if you did, how many errors did you get? Were there any successful bootouts?

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