By the maker of WTMemory · Updated Sept 2026
Every developer has met the zombie dev server: a Vite or Next.js process started days ago, in a terminal tab since closed, in a project folder since deleted - still holding port 3000, still eating 1-2 GB of RAM, still burning battery. Here is how to hunt them properly.
lsof -i :3000
That returns the PID. Then, for detail before you kill it:
ps -p <pid> -o pid,ppid,etime,%mem,command
etime is the killer column: a dev server that has been running for 3-12:41:07 is almost certainly something you forgot about.
kill <pid> # SIGTERM: lets it shut down cleanly
kill -9 <pid> # SIGKILL: only if it ignores the first one
Reach for -9 second, not first. Vite and Next.js flush caches on a clean shutdown; SIGKILL can leave stale lock files that make the next start confusing.
Orphans are not bound to any port you remember, so lsof will not find them. Look by process name instead:
ps -axww -o pid,etime,%mem,command | grep -Ei "vite|next-server|nodemon|workerd|esbuild|tsx watch" | grep -v grep
Each line shows how long it has been alive. Anything older than your current work session is a candidate.
Killing the terminal window does not kill its children reliably, and tools like nodemon, turbo and watchman deliberately detach to keep watching files. Add the modern stack - local LLM runtimes, MCP servers, browser automation - and a "clean" dev Mac can idle at 4 GB of RAM with nothing visibly open.
If you would rather not hunt PIDs every time: WTMemory sits in your menu bar and has a Kill Dev Servers action that finds all of the above by pattern and terminates them gracefully - plus a live RAM readout so you can see the 2 GB come back.
WTMemory is a 794 KB native Mac menu bar app: live memory pressure, one-click dev server kills, AI model cleanup, and a Space Inspector for the rest. Free to inspect forever; $9 once to act, on 3 Macs. No account, no telemetry.