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

nm-wipe

v1.0.0

Published

Interactive node_modules cleaner CLI for macOS

Readme

nm-wipe

Interactive node_modules cleaner CLI for macOS and Linux.

nm-wipe scans a directory tree for node_modules folders, lets you interactively filter and select them, and then deletes them (or simulates deletion in dry‑run mode). It’s designed to safely reclaim disk space from old projects.

Warning
This tool deletes directories. Always start with --dry-run until you’re comfortable with what it will remove.

Install

npm install -g nm-wipe
# or
pnpm add -g nm-wipe
# or
yarn global add nm-wipe

After installation you’ll have an nm-wipe binary on your PATH.

Usage

nm-wipe [root] [--dry-run]
  • root (optional): directory to scan.
    • Defaults to your desktop: ~/Desktop.
  • --dry-run: simulate deletions without removing anything.
  • --help / -h: show help.
  • --version / -v: show version.

Examples

# Safely preview what would be deleted under ~/Desktop
nm-wipe --dry-run

# Scan a specific projects folder (recommended: first run with --dry-run)
nm-wipe ~/dev --dry-run

# Actually delete selected node_modules under ~/dev
nm-wipe ~/dev

Interactive flow

  1. Scan: nm-wipe scans root (default ~/Desktop) up to a configurable depth for node_modules folders.
  2. Filter & sort:
    • Filter by:
      • Path segment (e.g. Axon, core, cenizaslabs-ai).
      • Size (e.g. >500M, <1G, >2G).
      • Age (last modified) (e.g. 30d, 6m, 1y).
    • Sort by:
      • Writable first (default).
      • Size (largest / smallest first).
      • Path A→Z.
  3. Select:
    • Use the checkbox UI to select which node_modules folders to delete.
    • Read‑only or no‑access directories are shown but disabled.
  4. Confirm:
    • nm-wipe shows how many folders are selected and an approximate total size to be freed.
    • You must confirm before anything is deleted.
  5. Wipe:
    • Deletions run one by one with a progress spinner.
    • Failures are reported and can be retried.

Environment variables

  • WIPEIT_DEPTH
    Maximum directory depth to scan from the root (default 8, hard‑capped at 50).

    WIPEIT_DEPTH=12 nm-wipe ~/dev --dry-run

Safety characteristics

  • Never follows symlinks.
  • Never recurses into node_modules contents (only removes the directory itself).
  • Uses filesystem permission checks to show whether a directory is writable, read‑only, or not accessible.
  • Uses du -sh to estimate sizes; timeouts and permission errors degrade gracefully without crashing the CLI.

Development

This repo uses TypeScript and ships compiled JavaScript in dist/.

Prerequisites:

  • Node.js 18+

Install dependencies (recommended: bun, but npm/pnpm also work):

bun install

Build and stamp the CLI:

bun run build
bun run postbuild

Run in dev mode (TS directly with tsx):

bun run dev

Run the built CLI locally:

node dist/index.js --dry-run

License

MIT © Boopathy Ganesh K