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

better-npkill

v1.0.2

Published

A fast, non-freezing CLI to find and delete dependency folders (npm, pnpm, yarn, bun) — a better npkill

Readme

better-npkill

npm version npm downloads license node

Fast CLI to find and delete dependency folders across JavaScript projects.

  • Works with npm, pnpm, yarn, and bun
  • Lists only parent dependency folders (no nested node_modules/.../node_modules noise)
  • Interactive TUI with multi-select, filtering, sorting, and safe delete options
  • JSON mode for scripts and automation

Quick Start

Run without global install:

npx better-npkill@latest

Other runtimes:

bunx better-npkill@latest
pnpm dlx better-npkill@latest

Install

Optional global install:

npm install -g better-npkill@latest

Then run:

better-npkill

Usage

# Current directory
better-npkill

# Specific root
better-npkill ~/dev

# Include package-manager caches as well
better-npkill ~/dev --pattern deps

# Only folders >= 100MB
better-npkill ~/dev --min-size 100MB

# Only folders older than 30 days
better-npkill ~/dev --older-than 30d

# Skip confirmation
better-npkill ~/dev --yes

# Move to trash instead of permanent delete
better-npkill ~/dev --trash

# Simulate delete
better-npkill ~/dev --dry-run

# Non-interactive JSON output
better-npkill ~/dev --json

CLI Options

| Flag | Description | | ------------------------- | ------------------------------------------------------ | | [rootDir] | Directory to scan (default: current working directory) | | --pattern <name> | Folder pattern or alias (deps), repeatable | | --min-size <size> | Minimum size, e.g. 100MB, 1.5GB | | --older-than <duration> | Minimum age, e.g. 30d, 12h | | --dry-run | Simulate deletion | | --yes | Skip confirmation | | --trash | Move to system trash | | --json | Print results as JSON and exit | | -h, --help | Show help | | -v, --version | Show version |

Patterns

| Pattern / alias | Default | Description | | ----------------------------- | --------------- | --------------------------------------------- | | node_modules | yes | Dependency folder (npm, pnpm, yarn, bun) | | deps | via --pattern | Alias: node_modules, .yarn, .pnpm-store | | .yarn | via --pattern | Yarn Berry cache | | .pnpm-store | via --pattern | pnpm store (local setups) | | .next | via --pattern | Next.js build cache | | dist, build | via --pattern | Build output folders | | .expo, android, .gradle | via --pattern | Expo / Android tooling folders |

Keybinds

| Key | Action | | ---------------------- | -------------------------------- | | / or j / k | Move cursor | | Space | Toggle selection | | a | Select all visible | | / | Filter by path | | s | Cycle sort (size / path / mtime) | | Enter or D | Delete selected (or focused row) | | ? | Toggle help | | q | Quit |

Confirm dialog: y to confirm, n to cancel.

Requirements

  • Node.js 20+

License

MIT