## TL;DR
Zombie processes are already dead; you cannot kill them because there is nothing to kill. They linger when their parent never reaps their exit status. The fix is aimed at the parent: if the parent is alive but buggy, restart it; if the parent is dead, init reaps them automatically. Chasing zombies with kill signals is the classic wasted hour.

## The query
```text
how to find and kill zombie processes on Linux servers
```

## Use this when
- ps shows processes in Z or defunct state
- Zombie counts keep growing
- You need to know whether zombies are harmful
- Cleaning up after a misbehaving service

## Not for when
- Processes consuming CPU or memory (those are alive, different problem)
- Killing hung but living processes
- Container-level process issues (check the container init)

## Steps

### Step 1: List the zombies and their parents
Show processes in zombie state along with their parent PIDs. The parent is the entire story: every zombie exists because its parent has not collected its exit status.
Expected output: zombie processes mapped to their parent processes.

### Step 2: Understand that zombies are harmless but symptomatic
A zombie holds no memory and no CPU, just a process table slot. A handful are noise; hundreds indicate a parent that never reaps children, which is a bug worth fixing. Do not panic at the count; investigate the parent.
Expected output: a calm assessment: noise vs a reaping bug.

### Step 3: If the parent is alive, restart or signal it
A living parent that accumulates zombies has a bug (not waiting on children). Restarting the parent clears its zombies, since the children get reparented to init which reaps them. Sending SIGCHLD sometimes nudges a stuck parent to reap.
Expected output: zombies cleared when the parent restarts; confirmation the parent was the cause.

### Step 4: If the parent is dead, init handles it
When the parent dies, orphaned zombies are reparented to PID 1, which reaps them. If zombies persist with PPID 1, the init system itself is not reaping, which points at a broken container init (a shell as PID 1 that does not reap) rather than the app.
Expected output: zombies reaped automatically, or the init problem identified.

### Step 5: Fix the root cause
For recurring zombies, fix the parent's child-reaping (handle SIGCHLD, wait on children) or use a proper init in containers (tini, dumb-init). Zombies that return after cleanup are a code or packaging bug, not an ops task.
Expected output: the parent reaps correctly; zombies stop accumulating.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_xWbI1OwuWYNo3wTWvasfEQ
