Find and safely free busy development ports from the terminal.
Every developer eventually hits this: Vite, Next.js, React, Laravel, Django, or an API server says port 3000 is already in use. port-cleaner-lite shows what is using the port and can safely terminate it when you confirm with --yes.
- Checks common dev ports in one command.
- Shows PID and command name for busy ports.
- Has a short alias:
pclean. - Safe by default: it never kills anything unless you pass both
--killand--yes. - Works great in local scripts and troubleshooting docs.
npm install -g port-cleaner-liteOr run directly:
npx port-cleaner-lite# Check common development ports
port-cleaner-lite
# Check specific ports
port-cleaner-lite 3000 5173
pclean 3000-3005
# JSON output for scripts
port-cleaner-lite --ports 3000,5173 --json
# Free a busy port after explicit confirmation
port-cleaner-lite 3000 --kill --yes🔒 3000 is busy:
- PID 12345 node (you)
✅ 5173 is free
3000, 3001, 4200, 5173, 5174, 8000, 8080, 9000
--kill requires --yes. This prevents accidentally terminating a database, browser, or production-like service.
port-cleaner-lite 3000 --kill # refused
port-cleaner-lite 3000 --kill --yes # allowedMIT