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

purge-deps

v1.2.2

Published

Delete JavaScript dependency leftovers and frontend build caches

Readme

purge-deps

purge-deps deletes JavaScript dependency leftovers and frontend build caches in a repo or monorepo. React Native / Expo leftovers are opt-in.

Run --dry-run first if you want to see what would be removed.

Installation

npm install -g purge-deps
npx purge-deps --dry-run

The npm package ships prebuilt binaries for macOS (arm64/x64), Linux (x64/arm64), and Windows (x64).

Usage

npx purge-deps [options]

With no flags, it walks the current directory using the js and frontend presets. Names in the ignore list are skipped. .gitignore globs under the search path are skipped unless the basename is also a target. .git is never deleted.

Options

-h, --help                         Show help
-p, --path <path>                  Directory to walk (default: .)
    --preset <presets>             Comma-separated presets (default: js,frontend)
-t, --targets <targets>            Replace delete targets; ignores presets
-e, --extends <targets>            Add names to the active preset targets
-i, --ignore <folders>             Add names to the default ignore list
    --replace-ignore <folders>     Replace the ignore list entirely
-g, --gitignore, --gi <true|false> Read `{path}/.gitignore` (default: true)
    --dry-run                      List matches without deleting them

-t and -e cannot be combined. -i and --replace-ignore cannot be combined.

-t and -e match basenames exactly. -e dist deletes every dist folder, including ones the frontend preset would leave alone (no package.json, or under android/ / ios/).

Presets

| Preset | Default | What it matches | |------------|---------|-----------------| | js | yes | node_modules, pnpm-lock.yaml, yarn.lock, package-lock.json, bun.lock, bun.lockb | | frontend | yes | .next, .nuxt, .output, .nitro, .svelte-kit, .vite, .turbo, .parcel-cache, .vercel/output | | mobile | no | .expo, .expo-shared, ios/Pods, ios/build, android/build, android/app/build, android/.gradle, android/.cxx, android/app/.cxx |

frontend also uses path-aware rules so generic folder names are not deleted everywhere:

  • dist / build — only when the parent directory has a package.json, and the path is not under android/ or ios/
  • out — only when a sibling .next or next.config.* exists
  • .vercel/output — not the whole .vercel directory

mobile does not delete the ios/ or android/ source trees themselves.

Defaults

| Option | Default | |------------|---------| | path | . | | preset | js,frontend | | ignore | .changeset, .git, .github, .husky, src | | gitignore| true |

Examples

# Preview default js+frontend matches
npx purge-deps --dry-run

# Delete default targets in a specific path
npx purge-deps -p ./apps

# JavaScript leftovers only (no .next / dist / .turbo)
npx purge-deps --preset js

# Include Expo / React Native leftovers
npx purge-deps --preset js,frontend,mobile

# Replace targets entirely (presets are ignored)
npx purge-deps -t "coverage,.cache"

# Add extra names on top of the active presets
npx purge-deps -e "tmp,.cache"

# Also skip vendor/ (keeps the default ignore list)
npx purge-deps -i vendor

# Ignore only vendor/
npx purge-deps --replace-ignore vendor

# Do not read .gitignore
npx purge-deps -g false