Skip to content

funnyhcat-dotcom/port-cleaner-lite

Repository files navigation

port-cleaner-lite

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.

Why people use it

  • 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 --kill and --yes.
  • Works great in local scripts and troubleshooting docs.

Install

npm install -g port-cleaner-lite

Or run directly:

npx port-cleaner-lite

Usage

# 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

Example output

🔒 3000 is busy:
   - PID 12345 node (you)
✅ 5173 is free

Common ports checked by default

3000, 3001, 4200, 5173, 5174, 8000, 8080, 9000

Safety

--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 # allowed

License

MIT

About

Find and safely free busy development ports from the terminal.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors