launchtl: any way to disable a daemon after removing the plist file?
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?
Solution 1:
To see ALL the daemons currently running, you need to type:
sudo launchctl list
Or sort them to nicely separate com.apple
ones:
sudo launchctl list | sort
And then you can remove it, for example:
sudo launchctl remove com.sassafras.KeyAccess.daemon
Important Note : If you don't want to get daemons on machine reboot, then please remove associated plist file.