Skip to content

Instantly share code, notes, and snippets.

@ivalsaraj
Last active February 5, 2026 11:42
Show Gist options
  • Select an option

  • Save ivalsaraj/ea3187b3a4e85bdd01750d17d7fb3c06 to your computer and use it in GitHub Desktop.

Select an option

Save ivalsaraj/ea3187b3a4e85bdd01750d17d7fb3c06 to your computer and use it in GitHub Desktop.
macOS Tahoe Debloat Script / osx optimiser (Disable System Bloat, Reduce CPU & RAM Usage)
#!/usr/bin/env bash
set -euo pipefail
# ============================================================
# macOS Lean Mode (Interactive) - Mac mini friendly
#
# ✅ Does:
# - Disable selected Apple LaunchAgents (per-user) and LaunchDaemons (system)
# using `launchctl bootout` + `launchctl disable`.
# - Creates a backup log so you can restore what was changed.
#
# ❌ Does NOT:
# - Delete apps from /System/Applications
# - Require SIP / authenticated-root changes
#
# Backup log:
# - ~/.macos-lean-mode-backup/disabled-services-YYYYMMDD-HHMMSS.txt
#
# Restore:
# - Option 4 in menu restores from latest backup file.
#
# ============================================================
UID_NOW="$(id -u)"
BACKUP_DIR="$HOME/.macos-lean-mode-backup"
TIMESTAMP="$(date +"%Y%m%d-%H%M%S")"
BACKUP_FILE="$BACKUP_DIR/disabled-services-$TIMESTAMP.txt"
mkdir -p "$BACKUP_DIR"
log_disabled() {
echo "$1" >> "$BACKUP_FILE"
}
hr() { printf "%s\n" "------------------------------------------------------------"; }
die() { echo "ERROR: $*" >&2; exit 1; }
has_cmd() { command -v "$1" >/dev/null 2>&1; }
require_cmds() {
has_cmd launchctl || die "launchctl not found"
has_cmd sudo || die "sudo not found"
}
disable_user_agent() {
local label="$1"
echo "→ [USER] disabling: $label"
log_disabled "gui:${UID_NOW}:$label"
launchctl bootout "gui/${UID_NOW}/${label}" >/dev/null 2>&1 || true
launchctl disable "gui/${UID_NOW}/${label}" >/dev/null 2>&1 || true
}
disable_system_daemon() {
local label="$1"
echo "→ [SYSTEM] disabling: $label"
log_disabled "system:$label"
sudo launchctl bootout "system/${label}" >/dev/null 2>&1 || true
sudo launchctl disable "system/${label}" >/dev/null 2>&1 || true
}
enable_user_agent() {
local uid="$1"
local label="$2"
echo "→ [USER] enabling: $label"
launchctl enable "gui/${uid}/${label}" >/dev/null 2>&1 || true
launchctl kickstart -k "gui/${uid}/${label}" >/dev/null 2>&1 || true
}
enable_system_daemon() {
local label="$1"
echo "→ [SYSTEM] enabling: $label"
sudo launchctl enable "system/${label}" >/dev/null 2>&1 || true
sudo launchctl kickstart -k "system/${label}" >/dev/null 2>&1 || true
}
# ============================================================
# Buckets (based on the b0gdanw Tahoe gist list)
# ============================================================
# ✅ SAFE: low blast radius, good ROI
# Expected performance benefit:
# - fewer telemetry/promo/tips computations
# - slightly lower idle CPU + fewer wakeups
# - small RAM savings over long uptime
SAFE_USER_AGENTS=(
"com.apple.ap.adprivacyd"
"com.apple.ap.promotedcontentd"
"com.apple.inputanalyticsd"
"com.apple.geoanalyticsd"
"com.apple.UsageTrackingAgent"
"com.apple.tipsd"
"com.apple.suggestd"
)
SAFE_SYSTEM_DAEMONS=(
"com.apple.analyticsd"
"com.apple.audioanalyticsd"
"com.apple.ecosystemanalyticsd"
"com.apple.wifianalyticsd"
)
# 🟡 MODERATE: use-case dependent
# Expected performance benefit:
# - noticeable reduction in background CPU spikes (Siri stack, Photos analysis)
# - moderate RAM savings if these stacks are active
# Tradeoff: disables Siri, Photos analysis/indexing, some continuity/media bits
MODERATE_USER_AGENTS=(
"com.apple.assistantd"
"com.apple.Siri.agent"
"com.apple.siriinferenced"
"com.apple.sirittsd"
"com.apple.siriactionsd"
"com.apple.siriknowledged"
"com.apple.watchlistd"
"com.apple.videosubscriptionsd"
"com.apple.ScreenTimeAgent"
"com.apple.photoanalysisd"
"com.apple.photolibraryd"
"com.apple.rapportd-user"
)
MODERATE_SYSTEM_DAEMONS=(
"com.apple.findmy.findmybeaconingd"
)
# 🔴 RISKY: higher chance of breaking features
# Expected performance benefit:
# - can reduce background sync and “smart feature” overhead
# Tradeoff:
# - may break iCloud/keychain sync, Time Machine, location, sharing, screen sharing,
# Finder previews/thumbnails, and other subtle system behaviors
RISKY_USER_AGENTS=(
"com.apple.security.cloudkeychainproxy3"
"com.apple.protectedcloudstorage.protectedcloudkeysyncing"
"com.apple.sharingd"
"com.apple.quicklook"
"com.apple.quicklook.ui.helper"
"com.apple.quicklook.ThumbnailsAgent"
"com.apple.screensharing.agent"
"com.apple.screensharing.menuextra"
"com.apple.screensharing.MessagesAgent"
)
RISKY_SYSTEM_DAEMONS=(
"com.apple.backupd"
"com.apple.backupd-helper"
"com.apple.cloudd"
"com.apple.icloud.searchpartyd"
"com.apple.locationd"
"com.apple.coreduetd"
"com.apple.modelmanagerd"
"com.apple.triald.system"
"com.apple.screensharing"
)
# ============================================================
# Preview / UX
# ============================================================
count_items() {
local -n arr="$1"
echo "${#arr[@]}"
}
print_list() {
local -n arr="$1"
for x in "${arr[@]}"; do echo " - $x"; done
}
preview_tier() {
local tier="$1"
hr
echo "Tier: $tier"
case "$tier" in
SAFE)
echo "Includes:"
echo " User agents: $(count_items SAFE_USER_AGENTS)"
echo " System daemons:$(count_items SAFE_SYSTEM_DAEMONS)"
echo
echo "Performance (expected):"
echo " - fewer background wakeups (telemetry/tips/suggestions)"
echo " - slightly lower idle CPU"
echo " - small RAM savings over long uptime"
echo
echo "Labels:"
print_list SAFE_USER_AGENTS
print_list SAFE_SYSTEM_DAEMONS
;;
MODERATE)
echo "Includes:"
echo " User agents: $(count_items MODERATE_USER_AGENTS)"
echo " System daemons:$(count_items MODERATE_SYSTEM_DAEMONS)"
echo
echo "Performance (expected):"
echo " - noticeably fewer CPU spikes (Siri/Photos analysis)"
echo " - moderate RAM savings if these subsystems run"
echo
echo "Tradeoffs:"
echo " - disables Siri stack, Photos analysis/indexing, some continuity/media bits"
echo
echo "Labels:"
print_list MODERATE_USER_AGENTS
print_list MODERATE_SYSTEM_DAEMONS
;;
RISKY)
echo "Includes:"
echo " User agents: $(count_items RISKY_USER_AGENTS)"
echo " System daemons:$(count_items RISKY_SYSTEM_DAEMONS)"
echo
echo "Performance (expected):"
echo " - potential reduction in background sync and smart-feature overhead"
echo
echo "Tradeoffs (high risk):"
echo " - may break iCloud/keychain sync, Time Machine, location, sharing/screen sharing"
echo " - may break Finder previews/thumbnails (Quick Look)"
echo
echo "Labels:"
print_list RISKY_USER_AGENTS
print_list RISKY_SYSTEM_DAEMONS
;;
*)
die "Unknown tier preview: $tier"
;;
esac
hr
}
apply_safe() {
: > "$BACKUP_FILE"
echo "Backup log: $BACKUP_FILE"
for a in "${SAFE_USER_AGENTS[@]}"; do disable_user_agent "$a"; done
for d in "${SAFE_SYSTEM_DAEMONS[@]}"; do disable_system_daemon "$d"; done
}
apply_moderate() {
for a in "${MODERATE_USER_AGENTS[@]}"; do disable_user_agent "$a"; done
for d in "${MODERATE_SYSTEM_DAEMONS[@]}"; do disable_system_daemon "$d"; done
}
apply_risky() {
for a in "${RISKY_USER_AGENTS[@]}"; do disable_user_agent "$a"; done
for d in "${RISKY_SYSTEM_DAEMONS[@]}"; do disable_system_daemon "$d"; done
}
restore_latest() {
local latest
latest="$(ls -t "$BACKUP_DIR"/disabled-services-*.txt 2>/dev/null | head -n 1 || true)"
[ -n "$latest" ] || die "No backup files found in $BACKUP_DIR"
echo "Restoring from: $latest"
hr
while read -r line; do
# gui:<uid>:<label> OR system:<label>
IFS=":" read -r scope a b <<< "$line"
if [ "$scope" = "gui" ]; then
enable_user_agent "$a" "$b"
elif [ "$scope" = "system" ]; then
enable_system_daemon "$a"
fi
done < "$latest"
hr
echo "Restore complete. Reboot recommended."
}
nuclear_reset_info() {
hr
echo "NUCLEAR RESET (manual):"
echo
echo "If things are badly broken and you want to reset launchctl overrides:"
echo " sudo rm -rf /private/var/db/com.apple.xpc.launchd/disabled.*"
echo " sudo rm -rf /private/var/db/com.apple.xpc.launchd/overrides.*"
echo " sudo reboot"
echo
echo "Warning: This resets ALL launchctl overrides, not just this script."
hr
}
confirm() {
local prompt="$1"
read -r -p "$prompt [y/N]: " ans
case "${ans,,}" in
y|yes) return 0 ;;
*) return 1 ;;
esac
}
menu() {
echo "macOS Lean Mode (Interactive)"
echo "User UID: $UID_NOW"
echo "Backup dir: $BACKUP_DIR"
hr
echo "Choose:"
echo " 1) SAFE (recommended) - low risk, good ROI"
echo " 2) SAFE + MODERATE - more savings, may disable features"
echo " 3) SAFE + MODERATE + RISKY - maximum debloat (high breakage risk)"
echo " 4) RESTORE last run - re-enable what this script disabled"
echo " 5) Nuclear reset info - last resort instructions"
echo " 0) Exit"
hr
}
main() {
require_cmds
menu
read -r -p "Enter choice: " choice
case "$choice" in
1)
preview_tier SAFE
confirm "Apply SAFE tier?" || exit 0
apply_safe
echo "SAFE applied. Reboot recommended: sudo reboot"
;;
2)
preview_tier SAFE
preview_tier MODERATE
confirm "Apply SAFE + MODERATE tiers?" || exit 0
apply_safe
apply_moderate
echo "SAFE+MODERATE applied. Reboot recommended: sudo reboot"
;;
3)
preview_tier SAFE
preview_tier MODERATE
preview_tier RISKY
echo "High risk option selected."
echo "If you use iCloud, Time Machine, Location Services, Screen Sharing, or Finder previews—do NOT proceed."
confirm "Type YES to proceed with RISKY tier?" && true || { echo "Cancelled."; exit 0; }
# Stronger confirmation
read -r -p "Final confirmation: type EXACTLY 'I ACCEPT BREAKAGE' to continue: " final
[ "$final" = "I ACCEPT BREAKAGE" ] || { echo "Cancelled."; exit 0; }
apply_safe
apply_moderate
apply_risky
echo "All tiers applied. Reboot recommended: sudo reboot"
;;
4)
restore_latest
;;
5)
nuclear_reset_info
;;
0)
echo "Bye."
;;
*)
die "Invalid choice."
;;
esac
hr
echo "Notes:"
echo "- Backup log created per run. Latest file is used for restore."
echo "- If issues persist, restore (option 4) + reboot."
echo "- If still broken, use nuclear reset (option 5) or reinstall macOS over existing install."
hr
}
main "$@"

Manual Mode (Advanced Users) — Disable macOS “Bloat” Services with Full Control

This is the manual alternative to running the script. You’ll run each command yourself, service by service.

✅ What this does

  • Disables selected LaunchAgents (per-user) and LaunchDaemons (system) using launchctl bootout + launchctl disable.

❌ What this does NOT do

  • Does NOT delete apps from /System/Applications
  • Does NOT require disabling SIP / authenticated-root (this is launchctl-only)

0) One-time setup: get your UID

Many guides hardcode 501. Don’t. Your UID can differ.

# Print your UID (you will use this value below)
id -u

# Example (set this in your shell for convenience):
UID=501   # <-- REPLACE with your actual UID from `id -u`

How to read the commands

For each service label: • bootout = stops it for the current session/boot (if currently running) • disable = prevents it from loading again automatically

# USER agent pattern
launchctl bootout gui/$UID/<label> 2>/dev/null
launchctl disable gui/$UID/<label>

# SYSTEM daemon pattern
sudo launchctl bootout system/<label> 2>/dev/null
sudo launchctl disable system/<label>

After a batch: reboot to fully settle.

✅ SAFE Tier (Low risk, good ROI)

Expected performance benefit • Fewer background wakeups (less telemetry/suggestions work) • Slightly lower idle CPU • Small RAM savings over long uptime

# ------------------------------------------------------------
# SAFE — USER LaunchAgents
# ------------------------------------------------------------

# com.apple.ap.adprivacyd
# Purpose: Ad privacy / policy enforcement used by Apple’s promoted content system.
# Why disable: If you don't care about Apple's promoted content pipeline, this reduces background policy work.
# Risk: Low (may affect promoted content personalization/metrics; usually irrelevant on Mac mini).
launchctl bootout gui/$UID/com.apple.ap.adprivacyd 2>/dev/null
launchctl disable gui/$UID/com.apple.ap.adprivacyd

# com.apple.ap.promotedcontentd
# Purpose: Promoted content + metrics pipeline (Apple apps/services).
# Why disable: Cuts background fetch/metrics work related to promoted content.
# Risk: Low (affects Apple “suggested/promoted” content experiences).
launchctl bootout gui/$UID/com.apple.ap.promotedcontentd 2>/dev/null
launchctl disable gui/$UID/com.apple.ap.promotedcontentd

# com.apple.inputanalyticsd
# Purpose: Input/typing interaction analytics.
# Why disable: Reduces background analytics processing.
# Risk: Low (diagnostic/analytics quality may reduce).
launchctl bootout gui/$UID/com.apple.inputanalyticsd 2>/dev/null
launchctl disable gui/$UID/com.apple.inputanalyticsd

# com.apple.geoanalyticsd
# Purpose: Location-related analytics (not the location service itself).
# Why disable: Reduces analytics churn.
# Risk: Low (not core location functionality).
launchctl bootout gui/$UID/com.apple.geoanalyticsd 2>/dev/null
launchctl disable gui/$UID/com.apple.geoanalyticsd

# com.apple.UsageTrackingAgent
# Purpose: Tracks usage patterns (commonly associated with Screen Time/usage measurement).
# Why disable: Reduces tracking tasks and wakeups.
# Risk: Low-to-moderate (Screen Time/usage reporting may degrade).
launchctl bootout gui/$UID/com.apple.UsageTrackingAgent 2>/dev/null
launchctl disable gui/$UID/com.apple.UsageTrackingAgent

# com.apple.tipsd
# Purpose: Apple Tips system (fetches and schedules tips).
# Why disable: Stops tips fetching/notifications and background operations.
# Risk: Low.
launchctl bootout gui/$UID/com.apple.tipsd 2>/dev/null
launchctl disable gui/$UID/com.apple.tipsd

# com.apple.suggestd
# Purpose: Suggestions engine (surfaces Siri-like suggestions in places).
# Why disable: Reduces “suggestion computation” background activity.
# Risk: Low-to-moderate (some suggestion features may be less helpful).
launchctl bootout gui/$UID/com.apple.suggestd 2>/dev/null
launchctl disable gui/$UID/com.apple.suggestd


# ------------------------------------------------------------
# SAFE — SYSTEM LaunchDaemons
# ------------------------------------------------------------

# com.apple.analyticsd
# Purpose: System analytics / diagnostics pipeline.
# Why disable: Reduces background telemetry and periodic processing.
# Risk: Low (Apple diagnostics/usage reporting reduced).
sudo launchctl bootout system/com.apple.analyticsd 2>/dev/null
sudo launchctl disable system/com.apple.analyticsd

# com.apple.audioanalyticsd
# Purpose: Audio analytics / diagnostics.
# Why disable: Reduces analytics background activity.
# Risk: Low.
sudo launchctl bootout system/com.apple.audioanalyticsd 2>/dev/null
sudo launchctl disable system/com.apple.audioanalyticsd

# com.apple.ecosystemanalyticsd
# Purpose: Analytics for ecosystem/framework interactions (telemetry).
# Why disable: Reduces telemetry processing.
# Risk: Low.
sudo launchctl bootout system/com.apple.ecosystemanalyticsd 2>/dev/null
sudo launchctl disable system/com.apple.ecosystemanalyticsd

# com.apple.wifianalyticsd
# Purpose: Wi-Fi analytics / diagnostics reporting.
# Why disable: Less background reporting.
# Risk: Low.
sudo launchctl bootout system/com.apple.wifianalyticsd 2>/dev/null
sudo launchctl disable system/com.apple.wifianalyticsd

# Reboot after SAFE tier
sudo reboot

🟡 MODERATE Tier (More gains, feature tradeoffs)

Expected performance benefit • Fewer CPU spikes from voice/suggestion stacks • Noticeable reduction in background work if these subsystems were active • Moderate RAM savings on long uptime

Tradeoffs • Disables Siri functionality • Disables Photos analysis/indexing • May affect some continuity features

# ------------------------------------------------------------
# MODERATE — Siri stack (USER)
# ------------------------------------------------------------

# com.apple.assistantd
# Purpose: Core Siri/Assistant service.
# Why disable: If you never use Siri, this removes a major background stack.
# Risk: Moderate (Siri stops working).
launchctl bootout gui/$UID/com.apple.assistantd 2>/dev/null
launchctl disable gui/$UID/com.apple.assistantd

# com.apple.Siri.agent
# Purpose: Siri per-user agent supporting assistant UX and events.
# Why disable: Completes the Siri shutdown.
# Risk: Moderate (Siri stops working).
launchctl bootout gui/$UID/com.apple.Siri.agent 2>/dev/null
launchctl disable gui/$UID/com.apple.Siri.agent

# com.apple.siriinferenced
# Purpose: Siri inference/intent processing.
# Why disable: Reduces CPU spikes from intent inference services.
# Risk: Moderate (Siri intelligence disabled).
launchctl bootout gui/$UID/com.apple.siriinferenced 2>/dev/null
launchctl disable gui/$UID/com.apple.siriinferenced

# com.apple.sirittsd
# Purpose: Siri text-to-speech daemon.
# Why disable: Removes TTS background service; saves RAM and occasional CPU.
# Risk: Moderate (Siri voice output impacted).
launchctl bootout gui/$UID/com.apple.sirittsd 2>/dev/null
launchctl disable gui/$UID/com.apple.sirittsd

# com.apple.siriactionsd
# Purpose: Siri actions / shortcuts execution support.
# Why disable: Stops Siri action handling.
# Risk: Moderate (Siri actions/automation degraded).
launchctl bootout gui/$UID/com.apple.siriactionsd 2>/dev/null
launchctl disable gui/$UID/com.apple.siriactionsd

# com.apple.siriknowledged
# Purpose: Siri knowledge / personalization store services.
# Why disable: Stops Siri knowledge maintenance.
# Risk: Moderate (Siri intelligence degraded).
launchctl bootout gui/$UID/com.apple.siriknowledged 2>/dev/null
launchctl disable gui/$UID/com.apple.siriknowledged


# ------------------------------------------------------------
# MODERATE — Media + Screen Time (USER)
# ------------------------------------------------------------

# com.apple.watchlistd
# Purpose: Apple TV watchlist tracking/sync.
# Why disable: If you don’t use Apple TV app, this reduces background sync.
# Risk: Moderate (Apple TV watchlist features reduced).
launchctl bootout gui/$UID/com.apple.watchlistd 2>/dev/null
launchctl disable gui/$UID/com.apple.watchlistd

# com.apple.videosubscriptionsd
# Purpose: Handles video subscription metadata (TV ecosystem).
# Why disable: Removes subscription background checks if you don’t use TV services.
# Risk: Moderate (TV subscriptions metadata may break).
launchctl bootout gui/$UID/com.apple.videosubscriptionsd 2>/dev/null
launchctl disable gui/$UID/com.apple.videosubscriptionsd

# com.apple.ScreenTimeAgent
# Purpose: Screen Time per-user agent.
# Why disable: Reduces background tracking and UI updating.
# Risk: Moderate (Screen Time features degraded).
launchctl bootout gui/$UID/com.apple.ScreenTimeAgent 2>/dev/null
launchctl disable gui/$UID/com.apple.ScreenTimeAgent


# ------------------------------------------------------------
# MODERATE — Photos analysis/indexing (USER)
# ------------------------------------------------------------

# com.apple.photoanalysisd
# Purpose: Photos intelligence/analysis (faces, objects, memories).
# Why disable: Often heavy background CPU; big win on idle.
# Risk: Moderate (Photos search/intelligence features degrade).
launchctl bootout gui/$UID/com.apple.photoanalysisd 2>/dev/null
launchctl disable gui/$UID/com.apple.photoanalysisd

# com.apple.photolibraryd
# Purpose: Photos library management/maintenance.
# Why disable: Reduces Photos background maintenance work if you don't use Photos app.
# Risk: Moderate (Photos library background tasks stop; Photos features degrade).
launchctl bootout gui/$UID/com.apple.photolibraryd 2>/dev/null
launchctl disable gui/$UID/com.apple.photolibraryd


# ------------------------------------------------------------
# MODERATE — Continuity/rapport (USER)
# ------------------------------------------------------------

# com.apple.rapportd-user
# Purpose: Continuity/Handoff-related device-to-device communication (rapport).
# Why disable: Reduces network chatter and background pairing if you don’t use Handoff/Continuity.
# Risk: Moderate (Handoff/Continuity features may break).
launchctl bootout gui/$UID/com.apple.rapportd-user 2>/dev/null
launchctl disable gui/$UID/com.apple.rapportd-user


# ------------------------------------------------------------
# MODERATE — Find My beaconing (SYSTEM) (AVOID THIS IF YOU WANT FIND MY MAC FEATURE)
# ------------------------------------------------------------

# com.apple.findmy.findmybeaconingd
# Purpose: Find My-related beaconing.
# Why disable: If you never use Find My on this Mac mini, reduces background signaling.
# Risk: Moderate (Find My / tracking related features may degrade).
sudo launchctl bootout system/com.apple.findmy.findmybeaconingd 2>/dev/null
sudo launchctl disable system/com.apple.findmy.findmybeaconingd

# Reboot after MODERATE tier
sudo reboot

🔴 RISKY Tier (Maximum debloat, high breakage risk)

Expected performance benefit • Potentially reduces background sync and “smart feature” infrastructure overhead

High breakage risk • iCloud / Keychain sync issues • Time Machine disabled • Location services disabled • Sharing/Screen Sharing broken • Finder previews/thumbnails broken (Quick Look)

# ------------------------------------------------------------
# RISKY — iCloud/Keychain syncing (USER)
# ------------------------------------------------------------

# com.apple.security.cloudkeychainproxy3
# Purpose: iCloud Keychain sync proxy.
# Why disable: Reduce iCloud keychain sync background work.
# Risk: HIGH (breaks iCloud Keychain sync / credential syncing).
launchctl bootout gui/$UID/com.apple.security.cloudkeychainproxy3 2>/dev/null
launchctl disable gui/$UID/com.apple.security.cloudkeychainproxy3

# com.apple.protectedcloudstorage.protectedcloudkeysyncing
# Purpose: Protected cloud key syncing for cloud storage protections.
# Why disable: Reduces background cloud key sync operations.
# Risk: HIGH (may break iCloud protected storage/key syncing behaviors).
launchctl bootout gui/$UID/com.apple.protectedcloudstorage.protectedcloudkeysyncing 2>/dev/null
launchctl disable gui/$UID/com.apple.protectedcloudstorage.protectedcloudkeysyncing


# ------------------------------------------------------------
# RISKY — Sharing (USER)
# ------------------------------------------------------------

# com.apple.sharingd
# Purpose: Core sharing services (AirDrop/Share Sheet related plumbing).
# Why disable: Reduces sharing-related background processes.
# Risk: HIGH (sharing features can break unexpectedly).
launchctl bootout gui/$UID/com.apple.sharingd 2>/dev/null
launchctl disable gui/$UID/com.apple.sharingd


# ------------------------------------------------------------
# RISKY — Finder previews/thumbnails (Quick Look) (USER)
# ------------------------------------------------------------

# com.apple.quicklook
# Purpose: Quick Look service (Finder previews).
# Why disable: Reduces preview generation overhead.
# Risk: HIGH (Finder previews break; UX regression).
launchctl bootout gui/$UID/com.apple.quicklook 2>/dev/null
launchctl disable gui/$UID/com.apple.quicklook

# com.apple.quicklook.ui.helper
# Purpose: UI helper for Quick Look.
# Why disable: Complements Quick Look shutdown.
# Risk: HIGH (Finder preview UX breaks).
launchctl bootout gui/$UID/com.apple.quicklook.ui.helper 2>/dev/null
launchctl disable gui/$UID/com.apple.quicklook.ui.helper

# com.apple.quicklook.ThumbnailsAgent
# Purpose: Thumbnails generation for Finder.
# Why disable: Reduces thumbnail work.
# Risk: HIGH (Finder icons/thumbnails may break).
launchctl bootout gui/$UID/com.apple.quicklook.ThumbnailsAgent 2>/dev/null
launchctl disable gui/$UID/com.apple.quicklook.ThumbnailsAgent


# ------------------------------------------------------------
# RISKY — Time Machine backups (SYSTEM)
# ------------------------------------------------------------

# com.apple.backupd
# Purpose: Time Machine backup daemon.
# Why disable: Removes backup background work.
# Risk: VERY HIGH (Time Machine stops working).
sudo launchctl bootout system/com.apple.backupd 2>/dev/null
sudo launchctl disable system/com.apple.backupd

# com.apple.backupd-helper
# Purpose: Helper for Time Machine backup operations.
# Why disable: Completes Time Machine shutdown.
# Risk: VERY HIGH (Time Machine stops working).
sudo launchctl bootout system/com.apple.backupd-helper 2>/dev/null
sudo launchctl disable system/com.apple.backupd-helper


# ------------------------------------------------------------
# RISKY — iCloud core (SYSTEM)
# ------------------------------------------------------------

# com.apple.cloudd
# Purpose: CloudKit / iCloud sync core daemon.
# Why disable: Reduces background iCloud sync tasks.
# Risk: VERY HIGH (breaks iCloud sync; can affect App Store and other services).
sudo launchctl bootout system/com.apple.cloudd 2>/dev/null
sudo launchctl disable system/com.apple.cloudd

# com.apple.icloud.searchpartyd
# Purpose: Find My network / search party related system component.
# Why disable: Reduce Find My network operations.
# Risk: HIGH (Find My features degrade).
sudo launchctl bootout system/com.apple.icloud.searchpartyd 2>/dev/null
sudo launchctl disable system/com.apple.icloud.searchpartyd


# ------------------------------------------------------------
# RISKY — Location services (SYSTEM)
# ------------------------------------------------------------

# com.apple.locationd
# Purpose: Core location services daemon.
# Why disable: Stops location background work.
# Risk: VERY HIGH (breaks any app requiring location; system prompts may fail).
sudo launchctl bootout system/com.apple.locationd 2>/dev/null
sudo launchctl disable system/com.apple.locationd


# ------------------------------------------------------------
# RISKY — “Smart features” infrastructure (SYSTEM)
# ------------------------------------------------------------

# com.apple.coreduetd
# Purpose: Proactive intelligence/knowledge store used by various features.
# Why disable: Reduces background intelligence maintenance.
# Risk: HIGH (can cause subtle, weird system behavior regressions).
sudo launchctl bootout system/com.apple.coreduetd 2>/dev/null
sudo launchctl disable system/com.apple.coreduetd

# com.apple.modelmanagerd
# Purpose: System ML model management (used by various intelligence features).
# Why disable: Potentially reduces ML model overhead.
# Risk: HIGH (can break system intelligence features; unknown side effects).
sudo launchctl bootout system/com.apple.modelmanagerd 2>/dev/null
sudo launchctl disable system/com.apple.modelmanagerd

# com.apple.triald.system
# Purpose: Apple experimentation / “trial” framework (feature flagging/experiments).
# Why disable: Reduces experiment framework activity.
# Risk: HIGH (unknown behavior; may affect feature availability).
sudo launchctl bootout system/com.apple.triald.system 2>/dev/null
sudo launchctl disable system/com.apple.triald.system


# ------------------------------------------------------------
# RISKY — Screen Sharing (SYSTEM)
# ------------------------------------------------------------

# com.apple.screensharing
# Purpose: Screen Sharing daemon.
# Why disable: Reduce background service (only if you never use Screen Sharing).
# Risk: VERY HIGH (remote access breaks).
sudo launchctl bootout system/com.apple.screensharing 2>/dev/null
sudo launchctl disable system/com.apple.screensharing

# Reboot after RISKY tier
sudo reboot

♻️ Manual Restore (Enable one service at a time)

Use this when something breaks and you want to re-enable just one label.

# USER agent restore example (Tips)
launchctl enable gui/$UID/com.apple.tipsd
launchctl kickstart -k gui/$UID/com.apple.tipsd

# SYSTEM daemon restore example (Location)
sudo launchctl enable system/com.apple.locationd
sudo launchctl kickstart -k system/com.apple.locationd

# Reboot if behavior doesn’t return immediately
sudo reboot

☢️ Nuclear Reset (Last resort)

This resets all launchctl disables/overrides (not just those you did here).

sudo rm -rf /private/var/db/com.apple.xpc.launchd/disabled.*
sudo rm -rf /private/var/db/com.apple.xpc.launchd/overrides.*
sudo reboot

Final rule (don’t be a hero)

Start SAFE. Reboot. Observe. Then add MODERATE. Treat RISKY as “I accept breakage.”

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