🧟 zkill

Kill zombie processes blocking your ports - instantly.

Stop Googling "how to kill port process" every single day.

$ zkill 3000
βœ” Port 3000 is in use
Process Details:
Process: node
PID: 12345
Command: /usr/local/bin/node server.js
User: developer
? Are you sure you want to kill process 12345? (y/N) y
βœ” Process 12345 terminated successfully
Port 3000 is now available.
$ _
npm install -g zombie-port-killer
πŸŽ‰

What's new

Clear ports faster, pipe scan output into scripts, and see why processes are runningβ€”all from one CLI.

⚑ Multi-port kill
zkill 3000 8000 5432
One run, several ports (deduped)
Works with --force
πŸ“¦ JSON scan
zkill scan --json
Stable, versioned output for jq & CI
Add --verbose for extra fields
πŸ” Smart scanning
zkill scan --range 3000-9000
--process, --project, --no-system
πŸ”¬ Process context
zkill scan --verbose
Uptime, parent, cwd, services
Plus project awareness & mappings

Built for day-to-day dev: microservices, scripts, and understanding what is actually bound to your ports.

Why zkill?

Every developer faces port conflicts. We built zkill to solve this once and for all.

🎯

One command (or several ports)

Same syntax on every OS: zkill 3000 or clear a list in one go: zkill 3000 8000 5432

🌍

Cross-Platform

Works identically on macOS, Linux, and Windows. No more platform-specific commands.

πŸ”’

Safe Mode

Asks for confirmation before killing. Warns about system processes. You're always in control.

🧠

Project Aware

Auto-detects projects (Node.js, Python, Go, Rust, PHP, Java) and remembers port associations. Filter scans by project or let it auto-learn over time.

⚑

Fast

Snappy port detection and a small CLI footprint. Uses the same OS tools you would run by hand, wrapped in TypeScript.

🎨

Beautiful CLI

Color-coded output, loading spinners, and clear messages. A joy to use.

πŸ”

Smart Scanning

Filter ports by range, process name, project, or hide system processes. Perfect for microservices.

πŸ”¬

Process Context

See why processes are running with detailed context: uptime, parent process, working directory, and service manager info. Use --verbose to understand what's happening.

🧾

JSON for scripts & CI

zkill scan --json prints a versioned document you can pipe to jq, log in pipelines, or gate checks in automationβ€”without scraping terminal colors.

Quick Start

Installation

npm install -g zombie-port-killer

Or use yarn or pnpm:

yarn global add zombie-port-killer
pnpm add -g zombie-port-killer

Usage

Kill a process on a specific port:

zkill 3000

Kill several ports in one command:

zkill 3000 8000 5432

Kill without confirmation:

zkill 3000 --force

List all active ports:

zkill scan

Scan as JSON (scripts, jq, CI):

zkill scan --json
zkill scan --json --verbose | jq '.count'

Filter ports by range:

zkill scan --range 3000-9000

Filter by process name:

zkill scan --process node

Hide system processes:

zkill scan --no-system

Filter by project name:

zkill scan --project myapp

Show detailed process context (uptime, parent, working directory):

zkill scan --verbose

Combine filters (perfect for microservices):

zkill scan --range 3000-9000 --process node --no-system --verbose

Show system and project information:

zkill info

List port-to-project mappings:

zkill list

Before vs After

😰 Before zkill

macOS:
lsof -ti :3000 | xargs kill -9
Linux:
sudo ss -lptn 'sport = :3000' | grep -oP '(?<=pid=)\d+' | xargs sudo kill -9
Windows:
FOR /F "tokens=5" %P IN ('netstat -ano ^| findstr :3000') DO TaskKill /PID %P /F

✨ With zkill

Everywhere:
zkill 3000
Multiple ports:
zkill 3000 8080
Machine-readable scan:
zkill scan --json
πŸŽ‰

One tool. All platforms.

Frequently Asked Questions

Common questions about zkill's security, usage, and features.

πŸ”’ Is zkill secure? Can I trust it?

Yes! zkill is 100% safe and transparent.

  • Open Source: Every line of code is public on GitHub. You can audit it yourself.
  • Zero Telemetry: No tracking, no analytics, no data collection. Nothing leaves your machine.
  • No Network Requests: zkill runs entirely offline. You can verify this with network monitoring.
  • Minimal Dependencies: Only 4 trusted npm packages (chalk, commander, inquirer, ora) - all extremely popular.
  • Standard Commands: Uses the same OS commands you'd run manually (lsof, ps, kill, etc.)
  • Safe by Default: Always asks for confirmation before killing processes.

Want proof? Clone the repo and read the source code. It's only ~2,000 lines of TypeScript. View on GitHub β†’

βš™οΈ How does zkill work?

zkill finds and kills processes using a cross-platform approach:

  • macOS: Uses lsof to find processes
  • Linux: Uses ss or netstat
  • Windows: Uses netstat and taskkill

These are the same commands you'd run manually - zkill just makes it easier and cross-platform.

πŸ’» Does it work on Windows/Linux/macOS?

Yes! zkill works on all three platforms:

  • βœ… macOS (Intel & Apple Silicon)
  • βœ… Linux (Ubuntu, Debian, Fedora, etc.)
  • βœ… Windows (PowerShell, CMD, Git Bash)

The same command works identically everywhere: zkill 3000

⚠️ Will zkill accidentally kill my database or important services?

No, it's safe:

  • zkill asks for confirmation before killing any process
  • It shows you details about what process will be killed
  • It warns you if the process looks like a system service
  • You must explicitly target a specific port - it won't randomly kill things

Pro tip: Use zkill scan first to see what's running before killing anything.

πŸ”‘ Do I need sudo/admin privileges?

Usually not. For your own development servers (the most common case), no special privileges needed.

You only need elevated privileges for:

  • Processes owned by other users
  • System services (like databases running as system user)
  • Ports below 1024 on some systems
🏭 Can I use zkill in production?

zkill is designed for local development, not production servers.

For production environments, use proper process managers:

  • PM2, systemd, or supervisord for Node.js apps
  • Kubernetes for containerized apps
  • Docker Compose for multi-container setups

zkill is perfect for fixing "Port 3000 already in use" errors during development!

πŸ’° Is zkill free?

Yes! 100% free and open source.

  • MIT License - use it anywhere, for anything
  • No paid tiers, no premium features
  • No ads, no tracking, no upsells
  • Free forever

If you find it useful, consider giving it a ⭐ star on GitHub!

🎯 Can I kill multiple ports at once?

Yes. Pass more than one port and zkill walks them in order (duplicates are ignored):

zkill 3000 8000 5432 β€” use --force to skip prompts for the whole run.

For automation, list listeners with zkill scan --json and parse the output with jq or your own tooling.

Kill-by-name (e.g. zkill --name node) is still on the roadmap.

Still have questions?

Ask on GitHub Issues

Ready to kill some zombies? 🧟

Join developers worldwide who've stopped Googling port commands.

npm install -g zombie-port-killer