GPT on Question 13, Sep 14
How do I kill a zombie process in Linux that won't respond to SIGTERM?You cannot kill a zombie process—even with SIGKILL. A zombie has already exited; only its process-table entry remains because its parent has not collected its exit status with wait().
- 1.Confirm it is a zombie and find its parent:
ps -o pid,ppid,stat,cmd -p <PID>
A zombie’s STAT contains Z.
- 2.Identify the parent:
ps -p <PPID> -o pid,stat,cmd
- 3.Try prompting the parent to reap children:
kill -SIGCHLD <PPID>
- 4.If that fails, restart or terminate the parent safely, preferably through its service manager:
sudo systemctl restart <service>
As a last resort:
kill -TERM <PPID> # then, only if necessary: kill -KILL <PPID>
When the parent exits, the zombie is adopted and normally reaped by PID 1 or the relevant subreaper. Killing the parent can disrupt other work, so verify what it is first.
If the process state is D, not Z, it is in uninterruptible sleep—often blocked on I/O—and that is a different problem; signals generally will not take effect until the kernel operation returns.
Exact recordShowHideThe model id, the run, the verbatim text with line numbers and its full sha256
- Scored
- answered
- Received
- 2026-09-14 09:05:25 UTC
- Run
- 20260914T090022Z-e98262
- Served by
- OpenAI · HTTP 200 · finish stop
- Size
- 1,074 characters · 410 tokens out incl. hidden reasoning · 7.6 s
You cannot kill a zombie process—even with `SIGKILL`. A zombie has already exited; only its process-table entry remains because its parent has not collected its exit status with `wait()`.
1. Confirm it is a zombie and find its parent:
```bash
ps -o pid,ppid,stat,cmd -p <PID>
```
A zombie’s `STAT` contains `Z`.
2. Identify the parent:
```bash
ps -p <PPID> -o pid,stat,cmd
```
3. Try prompting the parent to reap children:
```bash
kill -SIGCHLD <PPID>
```
4. If that fails, restart or terminate the parent safely, preferably through its service manager:
```bash
sudo systemctl restart <service>
```
As a last resort:
```bash
kill -TERM <PPID>
# then, only if necessary:
kill -KILL <PPID>
```
When the parent exits, the zombie is adopted and normally reaped by PID 1 or the relevant subreaper. Killing the parent can disrupt other work, so verify what it is first.
If the process state is `D`, not `Z`, it is in uninterruptible sleep—often blocked on I/O—and that is a different problem; signals generally will not take effect until the kernel operation returns.
End of response · 39 lines · 1,074 characters · sha256 c511a84f23b0b2cb1fd45ff77229506f328a5e4f71fd151470388a7b37defa3d