Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Basically, there are some system processes that I want to prevent from running. If I force quit them, they simply restart. How can I prevent them from starting/relaunching.

Before you say that I shouldn't mess with system processes: I fully understand the possible consequences.

share|improve this question

migrated from Jun 28 '11 at 21:51

This question came from our site for professional and enthusiast programmers.

Think this is better served in – Charles Sprayberry Jun 28 '11 at 19:36

It depends on how the process is being started and restarted. Most system processes are handled by launchd; if this is the case with the process you want to get rid of, you need to find the launchd item that's controlling it (it'll be one of the .plist files in /System/Library/LaunchDaemons or /Library/LaunchDaemons) and disable it with sudo launchctl unload /path/to/launchd/item.plist. If you want to make this permanent (i.e. stay disabled even when you reboot), add the -w flag: sudo launchctl unload -w /path/to/launchd/item.plist. Here's an example of finding and shutting down the krb5kdc process:

# First, find the pid of the running process:
$ ps -axwww | grep [k]rb5kdc
 3143 ??         0:33.38 /usr/sbin/krb5kdc -n
# Now find label of the the launchd item controlling it
$ sudo launchctl list | grep 3143
3143    -
# Now find the .plist file that defines that item label:
$ grep -l /Library/LaunchDaemons/* /System/Library/LaunchDaemons/*
# Finally, disable the launchd item (permanently):
$ sudo launchctl unload -w /System/Library/LaunchDaemons/
share|improve this answer

Your Answer


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