13

I was trying to permanently disable a 3rd party daemon, so I deleted its plist file from /Library/LaunchDaemons-- and then I realized that I hadn't done a launchctl unload on it first; trying after the fact yields "No such file or directory/nothing found to unload". And, of course the daemon is restartable, so when I kill it, it gets recreated.

I tried doing launchctl list in hopes of getting a label to use for launchctl remove but the daemon is no longer listed.

Short of rebooting, is there any way to get launchd to forget about the daemon and/or re-scan the configuration files?

  • The documentation is unclear, but launchctl kill com.example.product seems to work. – Abhi Beckert May 16 '18 at 0:24
18

To see ALL the daemons currently running, you need to type:

sudo launchctl list

And then you can remove it, for example:

sudo launchctl remove com.sassafras.KeyAccess.daemon
  • Huh, I guess if you're not root, it only shows the daemons launched for/as the user? – jhfrontz Dec 14 '12 at 4:22
  • 2
    This doesn't actually work for me. The entries come back on reboot. – Dmitry Minkovsky Oct 11 '14 at 16:34
  • 3
    @dimadima did you remove the associated plist file(s)? The commands provided by Dan only manipulate the current state (which is reset at next boot time to whatever is in /Library/LaunchDaemons). – jhfrontz Mar 4 '15 at 17:50
  • @jhfrontz yup I've learned by now that you have to do that. Thank you. – Dmitry Minkovsky Mar 4 '15 at 21:33
  • 1
    If it helps anyone, there are really always multiple unique lists available. All users in the directory have their own, although the root user and the logged in user are probably the most relevant. You can see all users who have processes with sudo ps aux or however you prefer then use sudo launchctl asuser [UniqueID] launchctl list to see the list for each user. – David Smith Aug 3 '18 at 5:47

You must log in to answer this question.

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