How to find and kill the process using port 3000 on macOS
Port 3000 already in use? Here's how to find the exact process holding it on macOS with lsof, stop it safely, and deal with zombie dev servers that survived Ctrl-C.

You ran npm run dev and got Error: listen EADDRINUSE: address already in use :::3000. Something is still holding port 3000, almost always a dev server that didn't shut down cleanly. Here's how to find and stop it.
1. Find what's using the port
lsof -i :3000
You'll get the process name and its PID (process ID):
COMMAND PID USER FD TYPE ... NAME
node 54123 you 23u IPv6 ... *:hbci (LISTEN)
2. Stop it
kill 54123
Use the PID from the previous step. This sends a normal termination signal and lets the process clean up.
3. If it won't die
A stuck process may ignore a normal kill. Force it:
kill -9 54123
-9 can't be ignored, but it also skips cleanup; use it only when a plain kill didn't work.
One-liner
kill -9 $(lsof -t -i :3000)
lsof -t prints just the PID, so this finds and kills whatever holds port 3000 in one go.
Zombie dev servers
The most common culprit is a dev server whose parent shell was closed while it was still running, or one that spawned child processes that outlived Ctrl-C. Killing the single PID sometimes isn't enough; the children keep the port. You may need to kill the whole process group.
The one-click way
Digging through lsof output every time gets old. Plumby shows what's on every port right in your menu bar. Click the port, see the process and the project behind it, and stop it (with its children) in one click, including the zombie servers that survived Ctrl-C.


