npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

portvac

v0.1.0

Published

See what's listening on a TCP port and free it - cross-platform, zero dependencies. npx portvac 3000

Readme

portvac

See what's listening on a TCP port - and free it. The "port already in use" error costs every developer a minute of lsof / netstat / taskkill archaeology. portvac lists who's on a port in one command, then vacates it on confirm. Cross-platform, zero dependencies.

npx portvac            # list every listening TCP port
npx portvac 3000       # show what's on 3000, then kill it (asks first)
npx portvac 3000 -k    # kill without asking (scripts / CI)
npx portvac 3000 -s KILL   # SIGKILL instead of the default SIGTERM

Python shop?

pip install portvac
portvac 3000 -k

Why

"Port 3000 is already in use" - and now you're pasting lsof -i :3000 into Stack Overflow for the fourth time this week.

lsof flags differ from netstat which differs from Windows taskkill. You remember none of them under pressure. portvac is the one command that works the same on macOS, Linux, and Windows: look first, kill second, never silent.

How it works

  1. List - shells out to the platform's own tool (lsof / ss / netstat) to read listening sockets. No daemon, no network.
  2. Show - prints a clean table: port, pid, process name, address, family.
  3. Vacate - on a port argument, asks y/N, then sends a signal (default TERM) to the owning pid(s). -k skips the prompt.

Nothing is installed system-wide and no data leaves your machine.

Usage

portvac                       List every TCP port currently listening
portvac <port>                Show what's on <port>, then kill it (asks first)
portvac <port> --list         Show only, don't kill
portvac <port> -k             Kill without confirmation
portvac <port> -s KILL        Send KILL instead of TERM
portvac --json [<port>]       Machine-readable output (great for piping)

  -k, --force         Kill without confirmation
  -l, --list          List only; never kill
  -s, --signal <SIG>  TERM (default), KILL, INT, QUIT, HUP
      --json          Emit JSON; suppresses colors and prompts
  -v, --version

JSON

$ portvac --json 3000
{
  "port": 3000,
  "listeners": [
    { "port": 3000, "pid": 12345, "name": "node", "address": "0.0.0.0", "protocol": "tcp", "family": "ipv4" }
  ]
}

Platform notes

| Platform | Lookup | Kill | |----------|--------|------| | macOS / BSD | lsof -iTCP -sTCP:LISTEN -P -n | process.kill(pid, SIG) | | Linux | ss -tlnp (falls back to netstat -tlnp) | os.kill(pid, sig) | | Windows | netstat -ano + tasklist | taskkill /PID <pid> /F /T |

On Windows there's no POSIX signal hierarchy, so portvac force-terminates (taskkill /F). To see another user's processes you may need elevated privileges, same as the underlying tools.

Exit codes

| Code | Meaning | |------|---------| | 0 | listed, or killed successfully | | 1 | nothing listening / port not in use / aborted | | 2 | error (bad args, tool missing, kill failed) |

License

MIT