Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disable bunch of #$!@ in Sierra (Version 2.1). Using Catalina? Check https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21
#!/bin/bash
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevice-user-agent' 'com.apple.icloud.fmfd' 'com.apple.imagent' 'com.apple.cloudfamilyrestrictionsd-mac' 'com.apple.cloudpaird' 'com.apple.cloudphotosd' 'com.apple.DictationIM' 'com.apple.assistant_service' 'com.apple.CallHistorySyncHelper' 'com.apple.CallHistoryPluginHelper' 'com.apple.AOSPushRelay' 'com.apple.IMLoggingAgent' 'com.apple.geodMachServiceBridge' 'com.apple.syncdefaultsd' 'com.apple.security.cloudkeychainproxy3' 'com.apple.security.idskeychainsyncingproxy' 'com.apple.security.keychain-circle-notification' 'com.apple.sharingd' 'com.apple.appleseed.seedusaged' 'com.apple.cloudd' 'com.apple.assistantd' 'com.apple.parentalcontrols.check' 'com.apple.parsecd' 'com.apple.identityservicesd')
for agent in "${TODISABLE[@]}"
do
{
sudo launchctl unload -w /System/Library/LaunchAgents/${agent}.plist
launchctl unload -w /System/Library/LaunchAgents/${agent}.plist
} &> /dev/null
sudo mv /System/Library/LaunchAgents/${agent}.plist /System/Library/LaunchAgents/${agent}.plist.bak
echo "[OK] Agent ${agent} disabled"
done
# Daemons to disable
TODISABLE=('com.apple.netbiosd' 'com.apple.preferences.timezone.admintool' 'com.apple.preferences.timezone.auto' 'com.apple.remotepairtool' 'com.apple.rpmuxd' 'com.apple.security.FDERecoveryAgent' 'com.apple.icloud.findmydeviced' 'com.apple.findmymacmessenger' 'com.apple.familycontrols' 'com.apple.findmymac' 'com.apple.SubmitDiagInfo' 'com.apple.screensharing' 'com.apple.appleseed.fbahelperd' 'com.apple.apsd' 'com.apple.AOSNotificationOSX' 'com.apple.FileSyncAgent.sshd' 'com.apple.ManagedClient.cloudconfigurationd' 'com.apple.ManagedClient.enroll' 'com.apple.ManagedClient' 'com.apple.ManagedClient.startup' 'com.apple.iCloudStats' 'com.apple.locationd' 'com.apple.mbicloudsetupd' 'com.apple.laterscheduler' 'com.apple.awacsd' 'com.apple.eapolcfg_auth' 'com.apple.familycontrols')
for daemon in "${TODISABLE[@]}"
do
{
sudo launchctl unload -w /System/Library/LaunchDaemons/${daemon}.plist
launchctl unload -w /System/Library/LaunchDaemons/${daemon}.plist
} &> /dev/null
sudo mv /System/Library/LaunchDaemons/${daemon}.plist /System/Library/LaunchDaemons/${daemon}.plist.bak
echo "[OK] Daemon ${daemon} disabled"
done
#!/bin/bash
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might enable things that you may not like. Please double check the services in the TOENABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to enable
TOENABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevice-user-agent' 'com.apple.icloud.fmfd' 'com.apple.imagent' 'com.apple.cloudfamilyrestrictionsd-mac' 'com.apple.cloudpaird' 'com.apple.cloudphotosd' 'com.apple.DictationIM' 'com.apple.assistant_service' 'com.apple.CallHistorySyncHelper' 'com.apple.CallHistoryPluginHelper' 'com.apple.AOSPushRelay' 'com.apple.IMLoggingAgent' 'com.apple.geodMachServiceBridge' 'com.apple.syncdefaultsd' 'com.apple.security.cloudkeychainproxy3' 'com.apple.security.idskeychainsyncingproxy' 'com.apple.security.keychain-circle-notification' 'com.apple.sharingd' 'com.apple.appleseed.seedusaged' 'com.apple.cloudd' 'com.apple.assistantd' 'com.apple.parentalcontrols.check' 'com.apple.parsecd' 'com.apple.identityservicesd')
for agent in "${TOENABLE[@]}"
do
{
sudo launchctl load -w /System/Library/LaunchAgents/${agent}.plist
launchctl load -w /System/Library/LaunchAgents/${agent}.plist
} &> /dev/null
sudo mv /System/Library/LaunchAgents/${agent}.plist.bak /System/Library/LaunchAgents/${agent}.plist
echo "[OK] Agent ${agent} enabled"
done
# Daemons to enable
TOENABLE=('com.apple.netbiosd' 'com.apple.preferences.timezone.admintool' 'com.apple.preferences.timezone.auto' 'com.apple.remotepairtool' 'com.apple.rpmuxd' 'com.apple.security.FDERecoveryAgent' 'com.apple.icloud.findmydeviced' 'com.apple.findmymacmessenger' 'com.apple.familycontrols' 'com.apple.findmymac' 'com.apple.AirPlayXPCHelper' 'com.apple.SubmitDiagInfo' 'com.apple.screensharing' 'com.apple.appleseed.fbahelperd' 'com.apple.apsd' 'com.apple.AOSNotificationOSX' 'com.apple.FileSyncAgent.sshd' 'com.apple.ManagedClient.cloudconfigurationd' 'com.apple.ManagedClient.enroll' 'com.apple.ManagedClient' 'com.apple.ManagedClient.startup' 'com.apple.iCloudStats' 'com.apple.locationd' 'com.apple.mbicloudsetupd' 'com.apple.laterscheduler' 'com.apple.awacsd' 'com.apple.eapolcfg_auth' 'com.apple.familycontrols')
for daemon in "${TOENABLE[@]}"
do
{
sudo launchctl load -w /System/Library/LaunchDaemons/${daemon}.plist
launchctl load -w /System/Library/LaunchDaemons/${daemon}.plist
} &> /dev/null
sudo mv /System/Library/LaunchDaemons/${daemon}.plist.bak /System/Library/LaunchDaemons/${daemon}.plist
echo "[OK] Daemon ${daemon} enabled"
done
@jaduff

This comment has been minimized.

Copy link

commented Oct 29, 2016

Nice. I tweaked a bunch of what you had, mostly to leave some things on you had set to remove. Huuuge noticeable improvement in performance.

@zylstra

This comment has been minimized.

Copy link

commented Nov 13, 2016

How do I use this?

@Neo23x0

This comment has been minimized.

Copy link

commented Nov 18, 2016

@jaduff Which Daemons did you leave as they are?

@wallace-aph

This comment has been minimized.

Copy link

commented Nov 18, 2016

Does this only work in Sierra? I've been having tons of issues with launchctl on el cap saying it "Could not find specified service" even with the correct plist file.

@ndrik

This comment has been minimized.

Copy link

commented Dec 8, 2016

I get the same as wallace-aph... Lots of "Could not find specified service" messages.

@JGRvanN

This comment has been minimized.

Copy link

commented Dec 25, 2016

After running this I lost all Bonjour connectivity, no "shared" item in the Finder sidebar and I can't run screen sharing and nothing shows up under "Network"

@walidvb

This comment has been minimized.

Copy link

commented Jan 31, 2017

@JGRvanR supposedly, to re-enable, just run the same script with load instead of unload :)

@Brantone

This comment has been minimized.

Copy link

commented Feb 1, 2017

FYI , in 10.12.3:

root # /bin/launchctl unload -w /System/Library/LaunchDaemons/com.apple.AirPlayXPCHelper.plist 
/System/Library/LaunchDaemons/com.apple.AirPlayXPCHelper.plist: Operation not permitted while System Integrity Protection is engaged

☹️

@DrEnter

This comment has been minimized.

Copy link

commented Feb 7, 2017

@Brantone - Found a mention about getting around SIP to disable stuff here: http://apple.stackexchange.com/questions/255662/disabling-airplay-on-mac-sierra

@dev1098

This comment has been minimized.

Copy link

commented Feb 16, 2017

@JGRvanN same here. I like the gains from running this, but breaking my LAN is a deal breaker. Anyone know what the Bonjour deps are?

@pwnsdx

This comment has been minimized.

Copy link
Owner Author

commented Mar 14, 2017

NEW VERSION This is the version 2.0 of this gist. Just re-run it.

What's new:

  • More services added
  • Files are now renamed to .plist.bak so it won't run ever again unless you rename it to .plist
  • It now requires SIP aka Rootless to be disabled to disable some services and to rename the files (you can reenable it after)
@pwnsdx

This comment has been minimized.

Copy link
Owner Author

commented Mar 14, 2017

iTunes is not working anymore. I'm actually investigating the problem and I'll fix it asap.

Edit: The issue has been solved. It was "com.apple.AirPlayXPCHelper" that was causing the crash therefore it has been enabled again.

@sjc314

This comment has been minimized.

Copy link

commented Mar 17, 2017

I just upgraded from Snow Leopard to Sierra and I can't believe all the connections Little Snitch is flagging. I don't use iCloud and don't have any iToys and don't "Social Network" so it's all wasted on me. Plus I don't like Apple spying on everything I do. Killing all these agents and daemons is a GREAT idea. Thanks!

BTW, there is a list of what a lot of these processes do at Triviaware

@pwnsdx

This comment has been minimized.

Copy link
Owner Author

commented Mar 20, 2017

@sjc314: Glad you liked this script! Don't hesitate to share it and thanks for the tip, didn't knew this website!

@AGNUcius

This comment has been minimized.

Copy link

commented Mar 20, 2017

On macOS Sierra 10.12.3 (16D32):
com.apple.Maps.mapspushd.plist Agent is named
com.apple.Maps.pushdaemon.plist

Other renamed or missing Daemons:
AOSNotificationOSX, FileSyncAgent.sshd, iCloudStats, mbicloudsetupd, laterscheduler

@pwnsdx

This comment has been minimized.

Copy link
Owner Author

commented Mar 24, 2017

On macOS Sierra 10.12.3 (16D32):
com.apple.Maps.mapspushd.plist Agent is named
com.apple.Maps.pushdaemon.plist
Other renamed or missing Daemons:
AOSNotificationOSX, FileSyncAgent.sshd, iCloudStats, mbicloudsetupd, laterscheduler

I added the missing entry. I believe the missing daemons were removed but I still want this script to be compatible with older macOS versions such as El Capitan.

Thanks you,

@pwnsdx

This comment has been minimized.

Copy link
Owner Author

commented Apr 2, 2017

Added (new?) com.apple.personad service to the kill list.

@PeetsB

This comment has been minimized.

Copy link

commented Apr 4, 2017

congrats, great work and easy to understand system patch. Have a side question: Could "little snitch" do the work too, i.e. just denying any communication from daemons? https://www.obdev.at/products/littlesnitch/index.html
BTW, I am not a rep from the company, just a heavy user, concerned about data privacy.

@andrell

This comment has been minimized.

Copy link

commented Apr 12, 2017

Thanks for sharing this.

@dev1098

This comment has been minimized.

Copy link

commented Apr 18, 2017

I really like the intent here, but 2.0 breaks Calendar in 10.12.4.

Totally reproducible: disable, reboot, Calendar breaks. enable, reboot, Calendar works.

I also have spindump disabled. I tried reenabling, but Calendar still broken with 2.0.

Here's an error report. Advice appreciated.

@pwnsdx

This comment has been minimized.

Copy link
Owner Author

commented Apr 19, 2017

congrats, great work and easy to understand system patch. Have a side question: Could "little snitch" do the work too, i.e. just denying any communication from daemons? https://www.obdev.at/products/littlesnitch/index.html
BTW, I am not a rep from the company, just a heavy user, concerned about data privacy.

Hello,

Thanks you. Regarding LS, you can, but the daemons will still be running and the buggy ones might eat your CPU/RAM/etc because they can't access the internet. By the way I noticed that Little Snitch was unable to detect Siri so.

I really like the intent here, but 2.0 breaks Calendar in 10.12.4.
Totally reproducible: disable, reboot, Calendar breaks. enable, reboot, Calendar works.
I also have spindump disabled. I tried reenabling, but Calendar still broken with 2.0.
Here's an error report. Advice appreciated.

Hello,

Thanks for reporting, maybe you should try to remove 'com.apple.CalendarAgent' (with quotes) from ./disable.sh and try again.

@pwnsdx

This comment has been minimized.

Copy link
Owner Author

commented Apr 19, 2017

New v2.1: Added 'com.apple.security.keychainsyncingoveridsproxy' to the LaunchAgents blacklist because it was completely eating my CPU without doing anything useful. There is no documentation about this daemon but I suspect that it is used to sync the keychain with a remote server. Maybe using Cryptomator activated it as it uses local WebDAV and Java etc, I don't know but it happened since I launched it.

@madranet

This comment has been minimized.

Copy link

commented Apr 20, 2017

How's about a list of what these various processes do, so folks can make an informed decision about which ones they want to disable?

While true, as regards the junk Apple bundles with OSX, "bunch of #$!@" ain't the most informative of descriptions!

@pwnsdx

This comment has been minimized.

Copy link
Owner Author

commented Apr 30, 2017

Hello @madranet, there are a bunch of already available informations on Google about the deactivated services.

@dev1098

This comment has been minimized.

Copy link

commented May 2, 2017

Removing com.apple.CalendarAgent from the TODISABLE list brought Calendar back to life.

I'm still hoping to get Bonjour back.... but I'll see if I can live without it for now.

@Redback812

This comment has been minimized.

Copy link

commented May 20, 2017

/System/Library/LaunchAgents/com.apple.SafariCloudHistoryPushAgent.plist - 'com.apple.SafariCloudHistoryPushAgent' when disable seem to speedup Safari, this a a macOS Serria 10.12.4

Somewhere in Agents to disable, plays havoc with the network lan & wireless , the Network does not show up in the Shared section of the Finder in sidebar, and even by other methods, if one can narrow this down to a list for active network from been disable would be welcome . Thanks for this excellent script & works a treat.

@thesoundofthings

This comment has been minimized.

Copy link

commented May 23, 2017

Created a GitHub account just to say thanks for this work, both tot he OP and the community!

I noticed a lot of network activity "phoning home" in radio silence, and wanted to try to shut it down in one fell swoop. Thanks to this, much of it is gone. I did notice that Messages will no longer start up, however. Does anyone know which specific service enable will bring that back, or should I learn to live without it?

thanks again.

@julien-tmp

This comment has been minimized.

Copy link

commented Jun 1, 2017

Thank you! That's awesome

@BrentNewland

This comment has been minimized.

Copy link

commented Jul 13, 2017

I'm worried about future updates undoing these changes. Why not use "launchctl disable" followed by "launchctl kill" instead of renaming the plist files?

@dekisugi123

This comment has been minimized.

Copy link

commented Jul 24, 2017

It runs well on Sierra, make the device run very cool. But in El Captain, it makes accountsd raging and stuck at highest freq(but still cool).

@au

This comment has been minimized.

Copy link

commented Jul 25, 2017

Sierra 10.12.6. com.apple.security.keychainsyncingoveridsproxy overloads CPU. iCloud is likely the culprit.

I suggest adding in

# 1. Delete iCloud accounts, or remove com.apple.iCloud* agents
# 2. Disable SIP
# 3. Restart and run the script
@mcandre

This comment has been minimized.

Copy link

commented Aug 30, 2017

Dang pwnsdx, you have really nice shell script style. How exactly does "${somearray[@]}" interact with a for loop and/or $IFS? Is there a difference between using an asterisk (*) vs. an at (@) when referring to a shell array?

@8ByteBit

This comment has been minimized.

Copy link

commented Aug 30, 2017

Does anyone know of a resource where I can look each of these agents and daemons up?
I've been searching for them individually and certain items on the list aren't turning up any useful information.

@ayan-das1234

This comment has been minimized.

Copy link

commented Oct 3, 2017

Script editor is not able to run this script saying expected "

@ArtemBernatskyy

This comment has been minimized.

Copy link

commented Oct 5, 2017

Awesome work but my games from mac appstore has stopped working, plz tell which parts i need to enable back.

@melMass

This comment has been minimized.

Copy link

commented Oct 31, 2017

Thanks a lot !!

A little suggestion to easily read and comment agents:

# Agents to disable
TODISABLE=('com.apple.AOSPushRelay' \
'com.apple.AirPlayUIAgent' \
'com.apple.AirPortBaseStationAgent' \
#'com.apple.CalendarAgent' \
'com.apple.CallHistoryPluginHelper' \
'com.apple.CallHistorySyncHelper' \
'com.apple.CommCenter-osx' \
'com.apple.DictationIM' \
'com.apple.DictationIM' \
'com.apple.IMLoggingAgent' \
'com.apple.Maps.mapspushd' \
'com.apple.Maps.pushdaemon' \
'com.apple.appleseed.seedusaged' \
'com.apple.assistant_service' \
'com.apple.assistantd' \
'com.apple.cloudd' \
'com.apple.cloudfamilyrestrictionsd-mac' \
'com.apple.cloudpaird' \
'com.apple.cloudphotosd' \
'com.apple.familycircled' \
'com.apple.familycontrols.useragent' \
'com.apple.familynotificationd' \
'com.apple.gamed' \
'com.apple.geodMachServiceBridge' \
'com.apple.iCloudUserNotifications' \
#'com.apple.icloud.findmydeviced.findmydevice-user-agent' \
'com.apple.icloud.fmfd' \
'com.apple.identityservicesd' \
'com.apple.imagent' \
'com.apple.parentalcontrols.check' \
'com.apple.parsecd' \
'com.apple.passd' \
'com.apple.personad' \
'com.apple.photoanalysisd' \
#'com.apple.screensharing.MessagesAgent' \
'com.apple.security.cloudkeychainproxy3' \
'com.apple.security.idskeychainsyncingproxy' \
'com.apple.security.keychain-circle-notification' \
'com.apple.security.keychainsyncingoveridsproxy' \
'com.apple.sharingd' \
'com.apple.syncdefaultsd' \
'com.apple.telephonyutilities.callservicesd' \ )

# Daemons to disable
TODISABLE=('com.apple.AOSNotificationOSX' \
'com.apple.FileSyncAgent.sshd' \
'com.apple.ManagedClient' \
'com.apple.ManagedClient.cloudconfigurationd' \
'com.apple.ManagedClient.enroll' \
'com.apple.ManagedClient.startup' \
'com.apple.SubmitDiagInfo' \
'com.apple.appleseed.fbahelperd' \
'com.apple.apsd' \
'com.apple.awacsd' \
'com.apple.eapolcfg_auth' \
'com.apple.familycontrols'
'com.apple.familycontrols' \
'com.apple.findmymac' \
'com.apple.findmymacmessenger' \
'com.apple.iCloudStats' \
'com.apple.icloud.findmydeviced' \
'com.apple.laterscheduler' \
'com.apple.locationd' \
'com.apple.mbicloudsetupd' \
'com.apple.netbiosd' \
'com.apple.preferences.timezone.admintool' \
'com.apple.preferences.timezone.auto' \
'com.apple.remotepairtool' \
'com.apple.rpmuxd' \
'com.apple.screensharing' \
'com.apple.security.FDERecoveryAgent' \)
@AlexCommandor

This comment has been minimized.

Copy link

commented Nov 15, 2017

First of all, sorry for my bad English.
So, is anybody found fix for empty Network in Finder after "disable.sh"? Stuck is that "enable.sh" does not revert functionality of Network :(

@ArtemBernatskyy

This comment has been minimized.

Copy link

commented Nov 19, 2017

@AlexCommandor , which mac os do you use ?

@AlexCommandor

This comment has been minimized.

Copy link

commented Nov 21, 2017

Latest 10.12.6 (Sierra)

@AlexCommandor

This comment has been minimized.

Copy link

commented Nov 21, 2017

First of all, sorry for my bad English.
I did it!!! :)
I've found agent that could NOT be disabled - 'com.apple.identityservicesd'! Without it Network is always empty :(
But that is not enough - enable.sh has some errors! 'sudo mv' must be BEFORE loading agents and services, not after as is now. This is why enable.sh not works correctly. So, it must be as follow:

#!/bin/bash

# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might enable things that you may not like. Please double check the services in the TOENABLE vars.

# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents

# Agents to enable
TOENABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevice-user-agent' 'com.apple.icloud.fmfd' 'com.apple.imagent' 'com.apple.cloudfamilyrestrictionsd-mac' 'com.apple.cloudpaird' 'com.apple.cloudphotosd' 'com.apple.DictationIM' 'com.apple.assistant_service' 'com.apple.CallHistorySyncHelper' 'com.apple.CallHistoryPluginHelper' 'com.apple.AOSPushRelay' 'com.apple.IMLoggingAgent' 'com.apple.geodMachServiceBridge' 'com.apple.syncdefaultsd' 'com.apple.security.cloudkeychainproxy3' 'com.apple.security.idskeychainsyncingproxy' 'com.apple.security.keychain-circle-notification' 'com.apple.sharingd' 'com.apple.appleseed.seedusaged' 'com.apple.cloudd' 'com.apple.assistantd' 'com.apple.parentalcontrols.check' 'com.apple.parsecd' 'com.apple.identityservicesd')

for agent in "${TOENABLE[@]}"
do
    sudo mv /System/Library/LaunchAgents/${agent}.plist.bak /System/Library/LaunchAgents/${agent}.plist
    {
        sudo launchctl load -w /System/Library/LaunchAgents/${agent}.plist
        launchctl load -w /System/Library/LaunchAgents/${agent}.plist
    } &> /dev/null
    echo "[OK] Agent ${agent} enabled"
done

# Daemons to enable
TOENABLE=('com.apple.netbiosd' 'com.apple.preferences.timezone.admintool' 'com.apple.preferences.timezone.auto' 'com.apple.remotepairtool' 'com.apple.rpmuxd' 'com.apple.security.FDERecoveryAgent' 'com.apple.icloud.findmydeviced' 'com.apple.findmymacmessenger' 'com.apple.familycontrols' 'com.apple.findmymac' 'com.apple.AirPlayXPCHelper' 'com.apple.SubmitDiagInfo' 'com.apple.screensharing' 'com.apple.appleseed.fbahelperd' 'com.apple.apsd' 'com.apple.AOSNotificationOSX' 'com.apple.FileSyncAgent.sshd' 'com.apple.ManagedClient.cloudconfigurationd' 'com.apple.ManagedClient.enroll' 'com.apple.ManagedClient' 'com.apple.ManagedClient.startup' 'com.apple.iCloudStats' 'com.apple.locationd' 'com.apple.mbicloudsetupd' 'com.apple.laterscheduler' 'com.apple.awacsd' 'com.apple.eapolcfg_auth' 'com.apple.familycontrols')

for daemon in "${TOENABLE[@]}"
do
    sudo mv /System/Library/LaunchDaemons/${daemon}.plist.bak /System/Library/LaunchDaemons/${daemon}.plist
    {
        sudo launchctl load -w /System/Library/LaunchDaemons/${daemon}.plist
        launchctl load -w /System/Library/LaunchDaemons/${daemon}.plist
    } &> /dev/null
    echo "[OK] Daemon ${daemon} enabled"
done
@henrik242

This comment has been minimized.

Copy link

commented Nov 28, 2017

@pwnsdx I can confirm that commenting out CalendarAgent fixes the Calendar issue. Also, @AlexCommandor's sudo mv fix seems to work well. And @melMass's "easy to read" list is a really good suggestion.

@sayan-sibyl

This comment has been minimized.

Copy link

commented Nov 29, 2017

How can I disable /System/Library/Services/AppleSpell.service ?

@sayan-sibyl

This comment has been minimized.

Copy link

commented Nov 29, 2017

And how to run this script

@sRm3pXJPMKKq3LWcRMgbCnKKFCNkhVmnfVF

This comment has been minimized.

Copy link

commented Dec 15, 2017

Excellent work! Thank you. One thing I suggest to be added: nscurlsessiond. I am not sure which service or daemon it belongs to, but it keeps on pushing towards apple. Furthermore, this script could be enhanced by adding null routes or host entries for hot apple beacons to ensure decent protection for service revival. These beacons spotted already (just unverified):

32-courier.push.apple.com
33-courier.push.apple.com
api-glb-sin.smoot.apple.com
captive.apple.com
gsp64-ssl.ls.apple.com
gspe1-ssl.ls.apple.com
init-s0st.push.apple.com
init.ess.apple.com
lcdn-locator.apple.com
mesu.apple.com

You dont even need to diable SIP to add null routes (sudo route add 17.0.0.0/8 8.8.8.8 or similar) to dump all traffic to apple off. Many of them are actually hosted at Akamai or elsewhere, for those, a plain old host entry at /etc/hosts will disable them completely.

@wrengr

This comment has been minimized.

Copy link

commented Jan 3, 2018

@melMass: even better, you don't need to escape the newlines within an array-variable assignment. (If you don't mind the backslashes, then you might as well just inline the array, a la for agent in 'blah' 'blah' 'blah'; do)

@psychowood

This comment has been minimized.

Copy link

commented Jan 21, 2018

I'm not sure if this is related, but since I disabled all the services in this list (I also added spindumpd and tailsomething) my TimeMachine backups are painingly slow. Anyone with the same issue?

@mischievous

This comment has been minimized.

Copy link

commented Feb 21, 2018

Something in the list of agents has taken out my finder/dock of my macbook pro. I suspect it was one of the last two agents but not positive.

@marcuslow

This comment has been minimized.

Copy link

commented Mar 14, 2018

thanks, i was checking why my mac mini was crawling like a tortoise and photoshop and capture one was unbearable. ran top and saw cloudphotosd, google that and reached here. Ran the script, killed the process and performance improvement is significant.
'com.apple.cloudphotosd' alone is using around 50% cpu all the time and poor Adobe gets a lot of blame.

@ghaschel

This comment has been minimized.

Copy link

commented Mar 26, 2018

Does this work fine with high sierra?

@aeonach

This comment has been minimized.

Copy link

commented Mar 26, 2018

Please remove the link to Triviaware that is pretty nasty!

@pascalayerbe

This comment has been minimized.

Copy link

commented Apr 7, 2018

Can you tell me if it works on high sierra 10.13.3. and how you load this script (terminal) ? Best regards

@Freccia

This comment has been minimized.

Copy link

commented Apr 20, 2018

I wonder if it is safe to also disable com.apple.GameController.gamecontrollerd.plist, maybe only if you don't play apple store's games ?

@Freccia

This comment has been minimized.

Copy link

commented Apr 20, 2018

BTW thanks for your work, it's awesome!
Another question, where can I find documentation on the disabled services? The docs on the internet seems very poor...

@philthepill

This comment has been minimized.

Copy link

commented Apr 22, 2018

Hi, I tried to determine which Processes/Daemons have to be left ON in order to have iCloud still running but all the rest turned off.
Any suggestions? I wasn't able to find out which of those thingies is responsible for syncing iCloud.
Many many thanks in advance!

@gopsmith

This comment has been minimized.

Copy link

commented Apr 23, 2018

I'm VERY interested in what philthepill mentions. I've been following QLab's advice and signing out of iCloud completely. But signing out of iCloud is a big deal, it's time-intensive and can cause corruption in my calendars & contacts. And I definitely don't want to permanently disable iCloud – I just need to temporarily disable it when using real-time music and video applications on stage. It would be great to be able to do this by disabling all the iCloud daemons and processes, with SIP turned off of course, instead of signing out.

In your disable/enable lists you have:
com.apple.iCloudUserNotifications
com.apple.icloud.findmydeviced.findmydevice-user-agent
com.apple.icloud.fmfd
com.apple.icloud.findmydeviced
com.apple.iCloudStats
com.apple.mbicloudsetupd

Do you think that's an exhaustive list, or are there other processes that would keep iCloud hogging the CPU when signed in?

Courtesy of QLab, here are couple more processes that you could add to the lists:
com.apple.photolibraryd
com.apple.notificationcenterui.agent

(NOTE: see my followup comment and fork, on 5/29/18 below)

@maxsnet

This comment has been minimized.

Copy link

commented May 18, 2018

Frecia, I have just found this: http://www.manpagez.com/man/8/callservicesd/ , then search for the daemon you want to have more info about. I found this page too https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/FDERecoveryAgent.8.html

Also, there is a question mark on the warning window of Little Snitch when a daemon tries to access internet, and it gives some info about what it is for.

And this page has some comments on some daemons http://tech.masterofsql.com/os-x/unload-disable-unwanted-agents-daemons-os-x.html

@gopsmith

This comment has been minimized.

Copy link

commented May 29, 2018

To this fantastic gist I've added sections (User Agents, "Library" Agents/Daemons) to disable/enable /Library/Launch* and ~/Library/LaunchAgents processes, which are specific to some real-time/music applications I have installed (substitute your own), but also include fairly common things like Dropbox and Google Chrome agents which eat up a lot of processing time. I also found all processes that are needed for iCloud to run, so now I don't have to actually Sign Out of iCloud (which can cause loss of Calendar and Contacts updates when you sign back in) in order to temporarily disable it.

Here's my fork:
https://gist.github.com/gopsmith/f216d8f41ea3b7d36d50a302e0a641dd

@CharlesMason

This comment has been minimized.

Copy link

commented Jun 12, 2018

@pwnsdx THANKS FOR SUCH A GREAT SCRIPT and supporting El Cap! Hey, maybe it's just me but I would think that wrapping this in a GUI and allowing it to be "dynamic" (minus the SIP disabled ones) so that you can Disable a lot of stuff until it's needed via applet on the Menu Bar would be worth paying for!! Ie. Not using any itunes disabled, but when you need it, a simply click to enable and start. Oh course, I am out of my league on this but just a thought!

@CharlyRipp

This comment has been minimized.

Copy link

commented Jul 5, 2018

@eduo

This comment has been minimized.

Copy link

commented Jul 10, 2018

There's a link to "triviaware" in a comment above. Please note that the link goes to a known malware/adware for mac. It should be edited/removed

@ArtemBernatskyy

This comment has been minimized.

Copy link

commented Sep 8, 2018

This is a description for those agents/daemons (it is copy-pasted from other script)

#DAEMONS+=('com.apple.AirPlayXPCHelper') #Airplay daemon
#DAEMONS+=('com.apple.AOSNotificationOSX') #Notifications
DAEMONS+=('com.apple.appleseed.fbahelperd') #Related to feedback
#DAEMONS+=('com.apple.apsd') #Apple Push Notification Service (apsd) - it's calling home quite often + used by Facetime and Messages
DAEMONS+=('com.apple.awacsd') #Apple Wide Area Connectivity Service daemon - Back to My Mac Feature
DAEMONS+=('com.apple.awdd') #Sending out diagnostics & usage
DAEMONS+=('com.apple.CrashReporterSupportHelper') #Crash reporter
#DAEMONS+=('com.apple.eapolcfg_auth') #perform privileged operations required by certain EAPOLClientConfiguration.h APIs
DAEMONS+=('com.apple.familycontrols') #Parent control
#DAEMONS+=('com.apple.FileSyncAgent.sshd') #Mostlikely sshd on this machine
#DAEMONS+=('com.apple.findmymac') #Find my mac daemon
#DAEMONS+=('com.apple.findmymacmessenger') #Related to find my mac daemon, propably act on commands sent through FindMyDevice in iCloud
#DAEMONS+=('com.apple.icloud.findmydeviced') #Related to find my mac
#DAEMONS+=('com.apple.iCloudStats') #Related to iCloud
#DAEMONS+=('com.apple.laterscheduler') #Schedule something?
#DAEMONS+=('com.apple.locationd') #Propably reading current location
#DAEMONS+=('com.apple.ManagedClient.cloudconfigurationd') #Related to manage current macOS user iCloud
#DAEMONS+=('com.apple.ManagedClient.enroll') #Related to manage current macOS user
#DAEMONS+=('com.apple.ManagedClient.startup') #Related to manage current macOS user
#DAEMONS+=('com.apple.ManagedClient') #Related to manage current macOS user
#DAEMONS+=('com.apple.mbicloudsetupd') #iCloud Settings
#DAEMONS+=('com.apple.netbiosd') #Netbiosd is microsoft's networking service. used to share files between mac and windows
#DAEMONS+=('com.apple.preferences.timezone.admintool') #Time setting daemon
#DAEMONS+=('com.apple.preferences.timezone.auto') #Time setting daemon
#DAEMONS+=('com.apple.remotepairtool') #Pairing devices remotely
#DAEMONS+=('com.apple.rpmuxd') #daemon for remote debugging of mobile devices.
DAEMONS+=('com.apple.screensharing') #Screensharing daemon
#DAEMONS+=('com.apple.security.FDERecoveryAgent') #Full Disk Ecnryption - Related to File Vault https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/FDERecoveryAgent.8.html
DAEMONS+=('com.apple.SubmitDiagInfo') #Feedback - most likely it submits your computer data when click 'About this mac'
#DAEMONS+=('com.apple.trustd') #Propably related to certificates

#AGENTS+=('com.apple.AirPlayUIAgent') #Related Airport
#AGENTS+=('com.apple.AirPortBaseStationAgent') #Related Airport
#AGENTS+=('com.apple.AOSPushRelay') # Related to iCloud https://github.com/fix-macosx/yosemite-phone-home/blob/master/icloud-user-r0/System/Library/PrivateFrameworks/AOSKit.framework/Versions/A/Helpers/AOSPushRelay.app/Contents/MacOS/AOSPushRelay/20141019T072634Z-auser-%5B172.16.174.146%5D:49560-%5B17.110.240.83%5D:443.log
AGENTS+=('com.apple.appleseed.seedusaged') #Feedback assistant
AGENTS+=('com.apple.assistant_service') #Siri
#AGENTS+=('com.apple.assistant') #Keychain
#AGENTS+=('com.apple.bird') #Part of iCloud
#AGENTS+=('com.apple.CalendarAgent') #Calendar events related to iCloud
#AGENTS+=('com.apple.CallHistoryPluginHelper') #Related to call history (iCloud)
#AGENTS+=('com.apple.CallHistorySyncHelper') #Related to call history syncing (iCloud)
#AGENTS+=('com.apple.cloudd') #Related to sync data to iCloud, most likely used by iMessage,Mail,iCloud drive, etc...
AGENTS+=('com.apple.cloudfamilyrestrictionsd-mac') #iCloud Family restrictions
#AGENTS+=('com.apple.cloudpaird') #Related to iCloud
AGENTS+=('com.apple.cloudphotosd') #Propably syncing your photos to icloud
AGENTS+=('com.apple.DictationIM') #Dictation
#AGENTS+=('com.apple.familycircled') #Family notifications, like reminders
#AGENTS+=('com.apple.familycontrols.useragent') #Family notifications, like reminders
#AGENTS+=('com.apple.familynotificationd') #Family notifications, like reminders
AGENTS+=('com.apple.gamed') #GameCenter
#AGENTS+=('com.apple.geodMachServiceBridge') #Located in GeoServices.framework, related to locations maybe used for maps, maybe as well for things like find my mac, or just syping
#AGENTS+=('com.apple.icloud.findmydeviced.findmydevice-user-agent') #Find my device ?
#AGENTS+=('com.apple.icloud.fmfd') #Find my device ?
#AGENTS+=('com.apple.iCloudUserNotifications') #iCloud notifications, like reminders
#AGENTS+=('com.apple.identityservicesd') #Used to auth some apps, as well used by iCloud
#AGENTS+=('com.apple.imagent') #Facetime & Messages
#AGENTS+=('com.apple.IMLoggingAgent') #IMFoundation.framework - Not sure about this one, maybe used to log in to computer on start
AGENTS+=('com.apple.parentalcontrols.check') #Related to parental control
AGENTS+=('com.apple.parsecd') #Used by spotlight and/or siri, propably some suggestions - CoreParsec.framework
AGENTS+=('com.apple.photoanalysisd') #Apple AI to analyse photos stored in Photos.app, most likely to match faces and scenery but it happens to make requests to Apple during process, i have not checked what are those requestes i have just blocked it with Little Snitch
AGENTS+=('com.apple.rtcreportingd') #Related to Home Sharing, most likely it checks if device is auth for home sharing + Facetime
AGENTS+=('com.apple.SafariCloudHistoryPushAgent') #Good one, sending out your browsing history... :)
AGENTS+=('com.apple.safaridavclient') #Sending bookmarks to iCloud, even if you disable it may send your bookmarks to Apple
# AGENTS+=('com.apple.SafariNotificationAgent') #Notifications in Safari
#AGENTS+=('com.apple.security.cloudkeychainproxy3') #Propably related to syncing keychain to icloud
#AGENTS+=('com.apple.security.idskeychainsyncingproxy') #Most likely also related to keychain - IDSKeychainSyncingProxy.bundle
#AGENTS+=('com.apple.security.keychain-circle-notification') #Related to keychain
#AGENTS+=('com.apple.sharingd') #Airdrop, Remote Disks, Shared Directories, Handoff
#AGENTS+=('com.apple.syncdefaultsd') ##Propably related to syncing keychain
#AGENTS+=('com.apple.telephonyutilities.callservicesd') #Handling phone and facetime calls
@x8x

This comment has been minimized.

Copy link

commented Oct 26, 2018

@pwnsdx Great stuff! Any chances to get this update for Mojave?

@sweiz

This comment has been minimized.

Copy link

commented Oct 30, 2018

Has anyone had success with this on Mojave?

@kyanar

This comment has been minimized.

Copy link

commented Nov 8, 2018

Yeah, since Mojave killing any of these daemons, unloading them and deleting the plist, results in macOS simply starting them up again. At this rate, I'm about to write a cron job to run every 30 seconds and terminate ****ing diskspaced if it's running. Getting pretty sick of being told that I'm running out of disk space and should buy iCloud every half hour because I've only got 13GB left.

@intika

This comment has been minimized.

Copy link

commented Nov 30, 2018

it works in mojave for me after 'csrutil disable'... now i am running that on a vm... service does not comeback

@helio-silva

This comment has been minimized.

Copy link

commented Jan 28, 2019

@helio-silva

This comment has been minimized.

Copy link

commented Jan 28, 2019

Suggestion to add TouristD in you list
see: [https://apple.stackexchange.com/questions/294291/what-is-touristd]
https://apple.stackexchange.com/questions/294291/what-is-touristd

@debajyoti-xyz

This comment has been minimized.

Copy link

commented Jul 16, 2019

image
For Most Agents & Daemons I am getting error:

Could not find specified service
OR
/System/Library/LaunchDaemons/com.apple.apsd.plist: Operation not permitted while System Integrity Protection is engaged

The errors remains same even if I run the individual unload command with sudo.

I am running macOS High Sierra 10.13.2

@Plokhi

This comment has been minimized.

Copy link

commented Jul 30, 2019

what happened? when i installed this cpu usage jumped to 25%. Accountsd and rapportd going insane. and it wont stop.

it's objectively worse as before i ran it. after i re-enabled it, cpu usage DID NOT go down again

@neoliminal

This comment has been minimized.

Copy link

commented Aug 2, 2019

@debajyoti-xyz You need to disable SIP. See @helio-silva comment two above yours. Don't forget to re-enable afterwards.

@nebular

This comment has been minimized.

Copy link

commented Sep 6, 2019

Fantastic script! I modified it a little so the list of files is external, maybe it is interesting to anybody. Also, the daemos and agents are moved into /System/Library/LaunchDaemons.off and /System/Library/LaunchAgents.off instead of renaming them to .bak

APPLESHIT.DISABLE.SH

(You need to run it with SUDO)

#!/bin/bash

[ -f /etc/appleshit.daemons.cfg ] || {
	echo "Please create /etc/appleshit.daemons.cfg with all daemons to disable, one per line."
	exit 1
}


[ -f /etc/appleshit.agents.cfg ] || {
	echo "Please create /etc/appleshit.agents.cfg with all agents to disable, one per line."
	exit 1
}

# Create backup dirs if not already created
[ -d /System/Library/LaunchDaemons.off ] || mkdir /System/Library/LaunchDaemons.off
[ -d /System/Library/LaunchAgents.off ] || mkdir /System/Library/LaunchAgents.off

# Disable AGENTS

echo "----- APPLE AGENTS"
input="/etc/appleshit.agents.cfg"

while IFS= read -r agent
do
  [ -f /System/Library/LaunchAgents/${agent}.plist ] && {
 	echo "- A ${agent} exists, disabling" 
        launchctl unload -w /System/Library/LaunchAgents/${agent}.plist
	mv /System/Library/LaunchAgents/${agent}.plist /System/Library/LaunchAgents.off/${agent}.plist
  } || {
 	echo "! A ${agent} DOES NOT EXIST" 
  }

done < "$input"

# Disable DAEMONS

input="/etc/appleshit.daemons.cfg"
echo "----- APPLE DAEMONS"
while IFS= read -r daemon
do
  [ -f /System/Library/LaunchDaemons/${daemon}.plist ] && {
 	echo "- D ${daemon} exists, disabling" 
        launchctl unload -w /System/Library/LaunchDaemons/${daemon}.plist
	mv /System/Library/LaunchDaemons/${daemon}.plist /System/Library/LaunchDaemons.off/${daemon}.plist
  } || {
 	echo "! D ${daemon} DOES NOT EXIST" 
  }

done < "$input"


APPLESHIT.ENABLE.SH

(You need to run it wth SUDO)


#!/bin/bash

# AGENTS

echo "----- APPLE AGENTS"
input="/etc/appleshit.agents.cfg"

while IFS= read -r agent
do
  [ -f /System/Library/LaunchAgents.off/${agent}.plist ] && {
 	echo "- A ${agent} was disabled, enabling" 
	mv /System/Library/LaunchAgents.off/${agent}.plist /System/Library/LaunchAgents/${agent}.plist
        launchctl load -w /System/Library/LaunchAgents/${agent}.plist
  } || {
 	echo "! A ${agent} does not exists, or was not disabled" 
  }

done < "$input"

# DAEMONS

input="/etc/appleshit.daemons.cfg"
echo "----- APPLE DAEMONS"
while IFS= read -r daemon
do
  [ -f /System/Library/LaunchDaemons.off/${daemon}.plist ] && {
 	echo "- D ${daemon} was disabled, enabling"
	mv /System/Library/LaunchDaemons.off/${daemon}.plist /System/Library/LaunchDaemons/${daemon}.plist
        launchctl load -w /System/Library/LaunchDaemons/${daemon}.plist
  } || {
 	echo "! D ${daemon} does not exists, or was not disabled" 
  }

done < "$input"



/etc/appleshit.daemons.cfg

contains daemons to disable , one per line

com.apple.preferences.timezone.admintool
com.apple.preferences.timezone.auto
com.apple.remotepairtool
com.apple.rpmuxd
com.apple.security.FDERecoveryAgent
com.apple.icloud.findmydeviced
com.apple.findmymacmessenger
com.apple.familycontrols
com.apple.findmymac
com.apple.SubmitDiagInfo
com.apple.appleseed.fbahelperd
com.apple.apsd
com.apple.AOSNotificationOSX
com.apple.FileSyncAgent.sshd
com.apple.ManagedClient.cloudconfigurationd
com.apple.ManagedClient.enroll
com.apple.ManagedClient
com.apple.ManagedClient.startup
com.apple.iCloudStats
com.apple.locationd
com.apple.mbicloudsetupd
com.apple.laterscheduler
com.apple.awacsd
com.apple.eapolcfg_auth
com.apple.familycontrols

/etc/appleshit.agents.cfg

contains agents to disable, one per line

com.apple.security.keychainsyncingoveridsproxy
com.apple.personad
com.apple.passd
com.apple.screensharing.MessagesAgent
com.apple.CommCenter-osx
com.apple.Maps.mapspushd
com.apple.Maps.pushdaemon
com.apple.photoanalysisd
com.apple.telephonyutilities.callservicesd
com.apple.AirPlayUIAgent
com.apple.AirPortBaseStationAgent
com.apple.CalendarAgent
com.apple.DictationIM
com.apple.iCloudUserNotifications
com.apple.familycircled
com.apple.familycontrols.useragent
com.apple.familynotificationd
com.apple.gamed
com.apple.icloud.findmydeviced.findmydevice-user-agent
com.apple.icloud.fmfd
com.apple.imagent
com.apple.cloudfamilyrestrictionsd-mac
com.apple.cloudpaird
com.apple.cloudphotosd
com.apple.DictationIM
com.apple.assistant_service
com.apple.CallHistorySyncHelper
com.apple.CallHistoryPluginHelper
com.apple.AOSPushRelay
com.apple.IMLoggingAgent
com.apple.geodMachServiceBridge
com.apple.syncdefaultsd
com.apple.security.cloudkeychainproxy3
com.apple.security.idskeychainsyncingproxy
com.apple.security.keychain-circle-notification
com.apple.sharingd
com.apple.appleseed.seedusaged
com.apple.cloudd
com.apple.assistantd
com.apple.parentalcontrols.check
com.apple.parsecd
com.apple.identityservicesd
@pwnsdx

This comment has been minimized.

Copy link
Owner Author

commented Sep 16, 2019

Hello everyone,

"Disable bunch of #$!@" has been updated for macOS Catalina. You can check it here: https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.