Skip to content

Instantly share code, notes, and snippets.

@huksley
Last active July 4, 2025 19:55
Show Gist options
  • Save huksley/564be2c903312bcee7dffe415d128f90 to your computer and use it in GitHub Desktop.
Save huksley/564be2c903312bcee7dffe415d128f90 to your computer and use it in GitHub Desktop.
Disabling photoanalysisd

For what it's worth (and with all the usual disclaimers about potentially making your mac unstable by disabling system services), here's some commands that will manipulate this service and services like it. Note the $UID in the command, that's just a bash shell variable that will resolve to some number. That's your numeric UID. You just run these commands from a Terminal command line. No special privileges needed.

If you want to disable it entirely, the first command stops it from respawning, and the second kills the one that is currently running:

launchctl disable gui/$UID/com.apple.photoanalysisd
launchctl kill -TERM gui/$UID/com.apple.photoanalysisd

(If you kill it without disabling it will die, but a new one will respawn and pick up where the old one left off)

I don't have this problem myself, so I can't try these next two commands. They're relying on good ole UNIX signals. You could theoretically suspend and resume the process like this ("STOP" and "CONT" are stop and continue):

launchctl kill -STOP gui/$UID/com.apple.photoanalysisd
launchctl kill -CONT gui/$UID/com.apple.photoanalysisd

I don't know what launchd does when running processes are suspended for a long time. Will it detect them as dead and kill and restart them? I dunno. But I do know they won't get any CPU time.

@jac-jim
Copy link

jac-jim commented Jul 4, 2025

I, too, put together a quick kit to help regular users shut this down, I work with a number of content creators who are already stretching the limits of their machines: stop-mediaanalysisd. The script there has a variable name for the process to search for, so it could be updated for photoanalysisd, or anything else really.

This uses the kill -STOP technique with a crontab entry that runs every minute. I can confirm that the launcher seems to restart the process from time-to-time, so a crontab entry is necessary to check for this and nip it early. Multiple copies of this script with different search targets could have multiple crontab entries.

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