Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I created a LaunchDaemon a while back to start a shell script I had written. It looks like someone deleted the .plist from /Library/LaunchDaemons.

In my system logs (/var/logs/system.log), i see that my system is constantly trying to launch that shell script, but, neither the script or the plist exist anymore.

I can't figure out how to get the system to stop trying to launch the script.

Any suggestions?

share|improve this question
1  
Have you restarted the computer? LaunchDaemons are loaded at system startup, so removing the .plist file after that doesn't kill them item (in fact, you need the .plist to unload the item after startup with sudo launchctl unload...). –  Gordon Davisson Jun 3 '13 at 17:43
    
I'll try that now.. thanks! –  Matt H. Jun 3 '13 at 17:48
    
It worked! Too simple. If you want to make an answer out of that... I'll accept it :) Thanks again. –  Matt H. Jun 3 '13 at 18:05
add comment

1 Answer

up vote 2 down vote accepted

LaunchDaemons are loaded at system startup, and once loaded they're kept in memory so removing the .plist file doesn't do anything. If the file were still there, you could unload it with sudo launchctl unload /Library/LaunchDaemons/com.whatever.plist, but that does require the file. Restarting the computer will reload the LaunchDaemons, effectively removing the phantom job.

After I wrote my original comment, I found another way that (I think) would've worked: you can remove a LaunchDaemon without the file by its label with sudo launchctl remove com.whatever

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.