Last active
July 22, 2024 20:35
-
-
Save gopsmith/f216d8f41ea3b7d36d50a302e0a641dd to your computer and use it in GitHub Desktop.
Disable bunch of #$!@ in High Sierra
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# NOTE: This script must be run from Terminal within RECOVERY MODE. This version is for macOS High Sierra. | |
# There is no need to disable SIP (via csrutil), because recovery mode is not constrained by SIP. | |
# WARNING: It might enable things that you may not like. Please double check the services in the TODISABLE vars. | |
# | |
# For OSes newer than High Sierra, see comments in the original gist author's Catalina version, at | |
# https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21 | |
# (see the "Note about Big Sur" at the top, and there are comments about Monterey further down). | |
# | |
# Get active services: launchctl list | grep -v "\-\t0" | |
# Find a service: grep -lR [service] /Volumes/Macintosh\ HD/System/Library/Launch* /Volumes/Macintosh\ HD/Library/Launch* /Volumes/Macintosh\ HD/Users/Gordon/Library/LaunchAgents | |
# User Agents to disable | |
TODISABLE=('com.citrixonline.GoToMeeting.G2MUpdate' 'com.dropbox.DropboxMacUpdate.agent' 'com.github.facebook.watchman' 'com.logmein.GoToMeeting.G2MUpdate' 'com.macpaw.CleanMyMac4.Updater' 'com.skype.skype.shareagent' 'com.spotify.webhelper' 'homebrew.mxcl.postgresql' 'homebrew.mxcl.chromedriver' 'homebrew.mxcl.mongodb' '') | |
for agent in "${TODISABLE[@]}" | |
do | |
{ | |
launchctl unload -w /Volumes/Macintosh\ HD/Users/Gordon/Library/LaunchAgents/${agent}.plist | |
launchctl unload -w /Volumes/Macintosh\ HD/Users/Gordon/Library/LaunchAgents/${agent}.plist | |
} &> /dev/null | |
mv /Volumes/Macintosh\ HD/Users/Gordon/Library/LaunchAgents/${agent}.plist /Volumes/Macintosh\ HD/Users/Gordon/Library/LaunchAgents/${agent}.plist.bak | |
echo "[OK] User Agent ${agent} disabled" | |
done | |
# Library Agents to disable | |
TODISABLE=('org.pqrs.karabiner.agent.karabiner_observer' 'org.pqrs.karabiner.agent.karabiner_grabber' 'org.pqrs.karabiner.karabiner_session_monitor' 'org.pqrs.karabiner.karabiner_console_user_server' 'com.avid.ApplicationManager' 'com.avid.avidlink' 'com.paceap.eden.licensed.agent' 'com.google.keystone.xpcservice' 'com.google.keystone.agent' 'com.microsoft.update.agent' 'com.oracle.java.Java-Updater' 'com.paragon-software.ntfs.notification-agent' 'com.avid.CloudClientServices' 'com.avid.transport.client' 'com.microsoft.OneDriveStandaloneUpdater') | |
for agent in "${TODISABLE[@]}" | |
do | |
{ | |
launchctl unload -w /Volumes/Macintosh\ HD/Library/LaunchAgents/${agent}.plist | |
launchctl unload -w /Volumes/Macintosh\ HD/Library/LaunchAgents/${agent}.plist | |
} &> /dev/null | |
mv /Volumes/Macintosh\ HD/Library/LaunchAgents/${agent}.plist /Volumes/Macintosh\ HD/Library/LaunchAgents/${agent}.plist.bak | |
echo "[OK] Library Agent ${agent} disabled" | |
done | |
# System Library Agents to disable | |
TODISABLE=('com.apple.SafariNotificationAgent' 'com.apple.appstoreupdateagent' 'com.apple.SafariPlugInUpdateNotifier' 'com.apple.iCloudHelper' 'com.apple.CloudPhotosConfiguration' 'com.apple.protectedcloudstorage.protectedcloudkeysyncing' 'com.apple.SafariCloudHistoryPushAgent' 'com.apple.ManagedClientAgent.agent' 'com.apple.ManagedClientAgent.enrollagent' 'com.apple.knowledge-agent' 'com.apple.siriknowledged' 'com.apple.bird' 'com.apple.corespotlightd' 'com.apple.corespotlightservice' 'com.apple.SafariBookmarksSyncAgent' 'com.apple.softwareupdate_notify_agent' 'com.apple.Spotlight' 'com.apple.videosubscriptionsd' 'com.avid.ApplicationManagerHelper' 'com.barebones.bbedit' 'com.apple.notificationcenterui' 'com.apple.photolibraryd' '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.CalendarAgent' '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 | |
{ | |
launchctl unload -w /Volumes/Macintosh\ HD/System/Library/LaunchAgents/${agent}.plist | |
launchctl unload -w /Volumes/Macintosh\ HD/System/Library/LaunchAgents/${agent}.plist | |
} &> /dev/null | |
mv /Volumes/Macintosh\ HD/System/Library/LaunchAgents/${agent}.plist /Volumes/Macintosh\ HD/System/Library/LaunchAgents/${agent}.plist.bak | |
echo "[OK] Agent ${agent} disabled" | |
done | |
# Library Daemons to disable | |
TODISABLE=('org.pqrs.karabiner.karabiner_kextd' 'org.pqrs.karabiner.karabiner_observer' 'org.pqrs.karabiner.karabiner_grabber' 'com.avid.bsd.shoetoolv120' 'com.avid.hub.service' 'com.avid.transport.client' 'com.docker.vmnetd' 'com.google.keystone.daemon' 'com.microsoft.autoupdate.helper' 'com.microsoft.office.licensingV2.helper' 'com.oracle.java.Helper-Tool' 'com.paceap.eden.licensed' 'com.paragon-software.installer' 'com.paragon-software.ntfs.loader' 'com.paragon-software.ntfsd' 'com.macpaw.CleanMyMac4.Agent' 'com.microsoft.OneDriveStandaloneUpdaterDaemon' 'com.microsoft.OneDriveUpdaterDaemon' 'com.vidyo.DPA.VidyoCamera') | |
for daemon in "${TODISABLE[@]}" | |
do | |
{ | |
launchctl unload -w /Volumes/Macintosh\ HD/Library/LaunchDaemons/${daemon}.plist | |
launchctl unload -w /Volumes/Macintosh\ HD/Library/LaunchDaemons/${daemon}.plist | |
} &> /dev/null | |
mv /Volumes/Macintosh\ HD/Library/LaunchDaemons/${daemon}.plist /Volumes/Macintosh\ HD/Library/LaunchDaemons/${daemon}.plist.bak | |
echo "[OK] Library Daemon ${daemon} disabled" | |
done | |
# System Library Daemons to disable | |
TODISABLE=('com.apple.softwareupdated' 'com.apple.softwareupdate_download_service' 'com.apple.softwareupdate_firstrun_tasks' '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.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 | |
{ | |
launchctl unload -w /Volumes/Macintosh\ HD/System/Library/LaunchDaemons/${daemon}.plist | |
launchctl unload -w /Volumes/Macintosh\ HD/System/Library/LaunchDaemons/${daemon}.plist | |
} &> /dev/null | |
mv /Volumes/Macintosh\ HD/System/Library/LaunchDaemons/${daemon}.plist /Volumes/Macintosh\ HD/System/Library/LaunchDaemons/${daemon}.plist.bak | |
echo "[OK] Daemon ${daemon} disabled" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# NOTE: This script must be run from Terminal within RECOVERY MODE. This version is for macOS High Sierra. | |
# There is no need to disable SIP (via csrutil), because recovery mode is not constrained by SIP. | |
# WARNING: It might enable things that you may not like. Please double check the services in the TOENABLE vars. | |
# | |
# For OSes newer than High Sierra, see comments in the original gist author's Catalina version, at | |
# https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21 | |
# (see the "Note about Big Sur" at the top, and there are comments about Monterey further down). | |
# | |
# Get active services: launchctl list | grep -v "\-\t0" | |
# Find a service: grep -lR [service] /Volumes/Macintosh\ HD/System/Library/Launch* /Volumes/Macintosh\ HD/Library/Launch* /Volumes/Macintosh\ HD/Users/Gordon/Library/LaunchAgents | |
# User Agents to enable | |
TOENABLE=('com.citrixonline.GoToMeeting.G2MUpdate' 'com.dropbox.DropboxMacUpdate.agent' 'com.github.facebook.watchman' 'com.logmein.GoToMeeting.G2MUpdate' 'com.macpaw.CleanMyMac4.Updater' 'com.skype.skype.shareagent' 'com.spotify.webhelper' 'homebrew.mxcl.postgresql' 'homebrew.mxcl.chromedriver' 'homebrew.mxcl.mongodb' '') | |
for agent in "${TOENABLE[@]}" | |
do | |
mv /Volumes/Macintosh\ HD/Users/Gordon/Library/LaunchAgents/${agent}.plist.bak /Volumes/Macintosh\ HD/Users/Gordon/Library/LaunchAgents/${agent}.plist | |
{ | |
launchctl load -w /Volumes/Macintosh\ HD/Users/Gordon/Library/LaunchAgents/${agent}.plist | |
launchctl load -w /Volumes/Macintosh\ HD/Users/Gordon/Library/LaunchAgents/${agent}.plist | |
} &> /dev/null | |
echo "[OK] User Agent ${agent} enabled" | |
done | |
# Library Agents to enable | |
TOENABLE=('org.pqrs.karabiner.agent.karabiner_observer' 'org.pqrs.karabiner.agent.karabiner_grabber' 'org.pqrs.karabiner.karabiner_session_monitor' 'org.pqrs.karabiner.karabiner_console_user_server' 'com.avid.ApplicationManager' 'com.avid.avidlink' 'com.paceap.eden.licensed.agent' 'com.google.keystone.xpcservice' 'com.google.keystone.agent' 'com.microsoft.update.agent' 'com.oracle.java.Java-Updater' 'com.paragon-software.ntfs.notification-agent' 'com.avid.CloudClientServices' 'com.avid.transport.client' 'com.microsoft.OneDriveStandaloneUpdater') | |
for agent in "${TOENABLE[@]}" | |
do | |
mv /Volumes/Macintosh\ HD/Library/LaunchAgents/${agent}.plist.bak /Volumes/Macintosh\ HD/Library/LaunchAgents/${agent}.plist | |
{ | |
launchctl load -w /Volumes/Macintosh\ HD/Library/LaunchAgents/${agent}.plist | |
launchctl load -w /Volumes/Macintosh\ HD/Library/LaunchAgents/${agent}.plist | |
} &> /dev/null | |
echo "[OK] Library Agent ${agent} enabled" | |
done | |
# System Library Agents to enable | |
TOENABLE=('com.apple.SafariNotificationAgent' 'com.apple.appstoreupdateagent' 'com.apple.SafariPlugInUpdateNotifier' 'com.apple.iCloudHelper' 'com.apple.CloudPhotosConfiguration' 'com.apple.protectedcloudstorage.protectedcloudkeysyncing' 'com.apple.SafariCloudHistoryPushAgent' 'com.apple.ManagedClientAgent.agent' 'com.apple.ManagedClientAgent.enrollagent' 'com.apple.knowledge-agent' 'com.apple.siriknowledged' 'com.apple.bird' 'com.apple.corespotlightd' 'com.apple.corespotlightservice' 'com.apple.SafariBookmarksSyncAgent' 'com.apple.softwareupdate_notify_agent' 'com.apple.Spotlight' 'com.apple.videosubscriptionsd' 'com.avid.ApplicationManagerHelper' 'com.barebones.bbedit' 'com.apple.notificationcenterui' 'com.apple.photolibraryd' '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.CalendarAgent' '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 | |
mv /Volumes/Macintosh\ HD/System/Library/LaunchAgents/${agent}.plist.bak /Volumes/Macintosh\ HD/System/Library/LaunchAgents/${agent}.plist | |
{ | |
launchctl load -w /Volumes/Macintosh\ HD/System/Library/LaunchAgents/${agent}.plist | |
launchctl load -w /Volumes/Macintosh\ HD/System/Library/LaunchAgents/${agent}.plist | |
} &> /dev/null | |
echo "[OK] Agent ${agent} enabled" | |
done | |
# Library Daemons to enable | |
TOENABLE=('org.pqrs.karabiner.karabiner_kextd' 'org.pqrs.karabiner.karabiner_observer' 'org.pqrs.karabiner.karabiner_grabber' 'com.avid.bsd.shoetoolv120' 'com.avid.hub.service' 'com.avid.transport.client' 'com.docker.vmnetd' 'com.google.keystone.daemon' 'com.microsoft.autoupdate.helper' 'com.microsoft.office.licensingV2.helper' 'com.oracle.java.Helper-Tool' 'com.paceap.eden.licensed' 'com.paragon-software.installer' 'com.paragon-software.ntfs.loader' 'com.paragon-software.ntfsd' 'com.macpaw.CleanMyMac4.Agent' 'com.microsoft.OneDriveStandaloneUpdaterDaemon' 'com.microsoft.OneDriveUpdaterDaemon' 'com.vidyo.DPA.VidyoCamera') | |
for daemon in "${TOENABLE[@]}" | |
do | |
mv /Volumes/Macintosh\ HD/Library/LaunchDaemons/${daemon}.plist.bak /Volumes/Macintosh\ HD/Library/LaunchDaemons/${daemon}.plist | |
{ | |
launchctl load -w /Volumes/Macintosh\ HD/Library/LaunchDaemons/${daemon}.plist | |
launchctl load -w /Volumes/Macintosh\ HD/Library/LaunchDaemons/${daemon}.plist | |
} &> /dev/null | |
echo "[OK] Library Daemon ${daemon} enabled" | |
done | |
# System Library Daemons to enable | |
TOENABLE=('com.apple.softwareupdated' 'com.apple.softwareupdate_download_service' 'com.apple.softwareupdate_firstrun_tasks' '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.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 "${TOENABLE[@]}" | |
do | |
mv /Volumes/Macintosh\ HD/System/Library/LaunchDaemons/${daemon}.plist.bak /Volumes/Macintosh\ HD/System/Library/LaunchDaemons/${daemon}.plist | |
{ | |
launchctl load -w /Volumes/Macintosh\ HD/System/Library/LaunchDaemons/${daemon}.plist | |
launchctl load -w /Volumes/Macintosh\ HD/System/Library/LaunchDaemons/${daemon}.plist | |
} &> /dev/null | |
echo "[OK] Daemon ${daemon} enabled" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My 2021 updates: I added more agents & daemons that potentially affect real-time music applications - mainly the NI Battery plugin, within host application GigPerformer 4. The script now runs only in Recovery Mode, where you don't need to disable SIP (I'm still using High Sierra, so I don't know if that is still the case on newer OSes). In addition to running this script, I manually disable Bluetooth and WiFi, Notifications, Spotlight indexing of /Volumes/Macintosh HD, the App Store's automatic check for updates, a bunch of User Login Items, and manually quit still-running applications like Dropbox and OneDrive. I uninstalled CleanMyMac X, which was yet another source of processes that caused distortion, dropouts, and note pile-ups in our Battery drum kits, and now my MacBook Pro runs GigPerformer and its plugins without issues at our live shows.