Consider the following commands

# launchctl stop 
Usage: launchctl stop <service-name>
# launchctl stop com.apple.SomeService
# launchctl disable com.apple.SomeService
Usage: launchctl disable <service-target>

What is the difference between a service-target and a service-name? How can I learn a service-target of a service from it's service-name?

1 Answer 1


A service target is a service name plus a target domain, which describes the context in which the service runs, e.g. whether it runs at system startup or when a particular user logs in etc.

The launchctl(1) manpage describes 6 ways of forming a service target from a service name. If you want to disable a service that runs at startup, you probably want one of these three depending on whether it's a service that runs at system startup or when you log in:

    Targets the system domain or a service within the system domain. The system
    domain manages the root Mach bootstrap and is considered a privileged execu-
    tion context. Anyone may read or query the system domain, but root privi-
    leges are required to make modifications.

    Targets the user domain for the given UID or a service within that domain. A
    user domain may exist independently of a logged-in user. User domains do not
    exist on iOS.

    Another form of the login specifier. Rather than specifying a user-login
    domain by its ASID, this specifier targets the domain based on which user it
    is associated with and is generally more convenient.

You can find out the uid number for your user account like this:

$ id -u
  • 38
    Is there a way to go from the service "label" or PID displayed by launchchtl list to the "service-target" without trying all of these possible domains?
    – algal
    Commented Dec 9, 2015 at 22:39
  • 1
    use gui/<PID>/<service-name> instead of user/<PID>/<service-name>
    – clearloop
    Commented Sep 22, 2020 at 16:20
  • 1
    if you want to view the services associated with the pid, from launchctl list, use launchctl print pid/<pid> Fails sometimes with Could not print domain: 1: Operation not permitted.
    – chiggsy
    Commented Jan 11, 2021 at 18:51
  • If you get "Operation not permitted", try sudo launchctl.... Commented Nov 30, 2021 at 18:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .