| name | cleanup-zombies |
| description | Kill zombie dev servers and test processes. Use when ports are blocked, processes are hanging, or test runners won't start. |
Cleanup Zombies
Kill zombie processes (dev servers, Playwright browsers, test runners) for the current project only. Safe to use in multi-project environments.
Instructions
Run the cleanup script — it previews what would be killed (nothing dies without
explicit consent; the preview-first ritual is script-enforced):
./.safeword/scripts/cleanup-zombies.sh
If the preview looks correct, confirm the kill with --yes:
./.safeword/scripts/cleanup-zombies.sh --yes
What It Does
- Auto-detects framework - Finds port from vite.config.ts, next.config.js, etc. (checks root,
packages/*/, apps/*/ for monorepos)
- Kills by port - Dev server port AND test port (port + 1000)
- Kills test processes - Playwright, Chromium, Electron (scoped to this project)
- Multi-project safe - Only kills processes matching this project's directory
Manual Override
If auto-detection fails or you need a specific port:
./.safeword/scripts/cleanup-zombies.sh 5173
./.safeword/scripts/cleanup-zombies.sh --yes 5173 "electron"
When to Use
- Port already in use when starting dev server
- Tests hanging or failing due to zombie processes
- Switching between projects
- Before running E2E tests
- After interrupted test runs