Instantly find and kill the process listening on any TCP port — right from your macOS menu bar. Free up
:3000,:8080,:5432and fix "address already in use" (EADDRINUSE) in one click.
PortKiller is a tiny, native macOS menu bar app for developers who constantly hit
"port already in use". It auto-discovers every listening TCP port on your Mac,
groups them by what they are (web server, database, dev tool, container, system),
and lets you kill the process behind a port with a single click — no more
hunting for PIDs with lsof and kill -9.
- 🔍 Auto-discovers all listening TCP ports — refreshed automatically (adaptive interval).
- ⚡ One-click kill — graceful
SIGTERM, thenSIGKILLif the process holds on; PID + port ownership re-validated before killing. - 🗂️ Smart categories — ports grouped into Web Server · Database · Development · Container · System.
- ⭐ Favorites — pin the ports you care about (
:3000,:5432…) to the top; persisted across launches. - 👁️ Watched ports + native notifications — get a macOS notification when a watched port opens or closes.
- 🔎 Search & filter — by port number, PID, process name, command or user.
- 🌳 List or tree view — flat by category, or grouped by process (
⌘T). - 💣 Kill All — clear every visible port at once (with confirmation).
- 🪶 Native & lightweight — pure SwiftUI,
LSUIElement(no Dock icon), no Electron, ~760 KB.
- Grab the latest
PortKiller.dmgfrom the Releases page. - Open the DMG and drag
PortKiller.appintoApplications. - Launch it — the
networkicon appears in your menu bar.
Gatekeeper note: the build is ad-hoc signed (not notarized). On first launch macOS may say "PortKiller can't be opened". Right-click the app → Open, then confirm — you only need to do this once. (Or:
System Settings → Privacy & Security → Open Anyway.)
See Build from source below.
Click the menu bar icon to open the popover:
- Click the ✕ next to a port to kill it (with a confirm step).
- Hover a row to reveal ★ (favorite) and 👁 (watch) toggles.
- Right-click a row for a context menu (kill, favorite, watch, and process details).
| Shortcut | Action |
|---|---|
⌘R |
Refresh |
⌘T |
Toggle list/tree |
⌘K |
Kill all |
⌘Q |
Quit |
Requirements: macOS 15+ and Swift 6 / Xcode 16.
git clone https://github.com/dev-toolings/httportkiller-menubar.git
cd httportkiller-menubar
swift test # run the test suite
swift build -c release
# Package a signed .app and a drag-to-Applications DMG
Scripts/package_app.sh
Scripts/make_dmg.sh # -> dist/PortKiller.dmg
open ".build/release/PortKiller.app"PortKiller shells out to lsof -iTCP -sTCP:LISTEN -P -n +c 0 to enumerate every
TCP listener, enriches each row with the process command line, and renders them in
a native MenuBarExtra popover. Killing a port re-validates that the PID still
owns the port, sends SIGTERM, waits, and escalates to SIGKILL only if needed —
so you never nuke the wrong process.
"Error: listen EADDRINUSE: address already in use :::3000" — a stale dev server
is still holding the port. Open PortKiller, find :3000, click ✕. Done.
Does it need admin rights? No. It can only kill processes owned by your user.
Does it phone home? No network access, no telemetry. Everything is local.
This project adapts design and implementation ideas from
productdevbook/port-killer (MIT).
See THIRD_PARTY_NOTICES.md.
MIT © 2026 MakFly