Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disable bunch of #$!@ in Sierra (Version 2.1)
#!/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?

@adouble42

This comment has been minimized.

Copy link

commented Jul 23, 2017

nicely done, to those with issues and LMGTFY type whingeing aka the guile to consider running some random code off the internet, without scrutiny bear in mind the chinese are cracking satellite phone encryption (http://www.zdnet.com/article/encryption-satellite-phones-unscramble-attack-research/) so i hope you aren't worried about hiding anything from them, either... was going to post something there about ransomware trojans some being rife for but, that seemed less concern trollish. gist is clear, enough...anyhow this grouchy disciple of bloodaxe seconds. just broke my mac's comfort zone so hard i replaced terminal completely...is not my thing, mac, but, maintain some software and use for the things i don't trust on workstation (everything)...so after getting pissed off yet again about the disappearing SDK hat trick at this point, they pull with XCode...there's so much to bitch at cupertino about as a dev, if it doesn't blink, they hate you for fks sake...primarily, i seek to develop for BSD platforms, so forked some to OSX when given hardware...i do not plan on living on the arbitrary release schedule they do sans jobs. they can't even release something that isn't broken; the recovery console being borked in sierra; recovery console, for fks sake...and shut up to any nerd that says that isn't a problem for them just because they patched the thing, if they even did, after the fact. the nerve of them breaking things weekly...it's clear i guess where the guile comes from. anyhow. yeah i think i'm about done coding for OSX :D i've moved back to my roots, now is some ARM bare metal projects; i guess reaction to the cancer of cupertino lately...this frigging air is in the trash, because of cruft like this. it's literally near physically worn out, and i'm moving my os x work to deprecated status and kicking full steam in to embedded and BSD after wards (where i was before sidetracking this highway to ennui)...this was a long rant to get to the point, that i saw another goddamn spy rat process in this thing i've been purging constantly sending them telemetry, when i had the nerve to look through some obfuscated list or other...then again this whole god-damned network is under the watchful eye of OSU flow-tools...which it didn't even take to find this trifling crap from them snuck in again. you should see the tantrum in my console when exorcised, i almost rolled launchd back to vixie cron to shut it up...put short, some people value this stuff, the others, may or may not; caveat emptor. i like it, fuck the rest, need not their counsel or their arms (remember then crypto was a munition for some time...) i still refuse to support sierra, nice thing, about being able to make that call; is i can. and then these bloody motherfuckers sent an xcode update, to my el capitan air, and deleted my g-d (means more when you do it less, eh?) d-mn-d el cap SDK and pushed down sierra, and changed the f'n thing over to it. i have restored these sdk's so many times, and part of why i keep this where is, is because am d-mn dev, and maintaining legacy code as well. f apple and f their whole f devs attitude. i saw them once on their own forum threaten a registered dev with NDA violation for mentioning scrolling being somewhat unusable in a beta; f anyone who fanboys that call 500x i'll fight anyone who does. cheers mate i like your work, keep it up https://cr.yp.to/snuffle.html

@adouble42

This comment has been minimized.

Copy link

commented Jul 23, 2017

also launchctl fails silently on occasion and the syntax is neurotic; they've documented intentions to drop and change, LMGTFY as well...some people simply do not want this stuff to come back, there's a button, sez fork, welcome to internet... if i was feeling less like dumpstering this thing, would have probably found it's configuration, excised there, and replaced with immutable placeholders (chattr somethingorother works) every last one. as it is one thing that's worked wonders is the haywire acpi which is gone..not a problem; coming from hardware backgrounds where acpi mean hacking a fan daemon to work off some other kludge because don't want to literally melt the nvidia hardware...which at a time was near universal...still, is what backup storage is for, i mv, not rm. yet

@adouble42

This comment has been minimized.

Copy link

commented Jul 23, 2017

anywho looking over OP git repo gives faith in ecosystem mrn at sdf dot org cheers

@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

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.