How to disable xpc items from launchd?

I sometimes encounter various tasks for com.apple.xpc.launchd in the system logs that give errors like Service only ran for 0 seconds. Pushing respawn out by 10 seconds. or Service exited with abnormal code: 78, etc.

How can I find and remove these services? It seems that they are not listed by traditional tools that I've seen and used so I'm not sure where they may be enumerated to the system to try to initialize and thus how to disable them...


Solution 1:

XPC Services

XPC services are low level components within applications. They are not designed to be managed by the user and can not be individually disabled without breaking applications:

The XPC Services API, part of libSystem, provides a lightweight mechanism for basic interprocess communication integrated with Grand Central Dispatch (GCD) and launchd. The XPC Services API allows you to create lightweight helper tools, called XPC services, that perform work on behalf of your application.

As an example, Safari.app's XPC services are stored within:

 /Applications/Safari.app/Contents/XPCServices

Report problems to the developer

In many cases, an XPC service behaviour is controlled by Apple's launchd implementation. Expect different behaviours for the exact same service between major macOS versions.

If there are specific XPC services causing serious problems, please tell the associated developer, be that Apple or a third party developer.