Why is apache2 showing up a defunct in the process list?

It is harmless. You can ignore it. It is a zombie process. The man page for ps has

Z    Defunct ("zombie") process, terminated but not reaped by its parent.

See also the Wikipedia page on Zombie process.

If you really want to get rid of it, restarting apache2 may do the trick. Rebooting the machine will certainly make it go away, but that is definitely not necessary.

This question is similar. - How can I kill a <defunct> process whose parent is init?


Defunct processes are zombie processes. The kill command has no effect on a zombie process. These can be killed by killing the parent process. You can find parent from the PPID value. If the PPID is 1(init) i.e. process is adapted by init as the parent is no more, then rebooting is the only solution.


You can send a SIGCHLD signal to the parent process instead of killing it. If parent process is registered with this signal and the wait system call is called, this defunct process will be removed.