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

repo-clean

v1.2.1

Published

Clean common build and cache folders from a repository.

Readme

repo-clean

Clean common build outputs and cache folders from a repository.

Quick Start

No installation needed! Run it directly with npx:

npx repo-clean

Or you can install it globally:

npm i -g repo-clean
repo-clean

Usage

Use the command patterns below with either npx repo-clean or repo-clean (after global install).

repo-clean [--dry-run] [--node-modules] [--pm-cache] [--logs] [--editor] [--tmp] [--force]
repo-clean --all [--keep-nm] [--dry-run] [--force]
repo-clean --help | -h
repo-clean --version | -v

repo-clean accepts flags only. Positional arguments are rejected with an error.

Default behavior (no flags)

Removes:

  • dist
  • build
  • coverage
  • .next
  • .turbo
  • .vite
  • .parcel-cache
  • .cache

Flags

  • --dry-run Print what would be removed without deleting anything.
  • --node-modules Also remove node_modules.
  • --force Skip confirmation prompt for node_modules removal.
  • --pm-cache Also remove package manager caches/stores:
    • .yarn/cache
    • .yarn/unplugged
    • .yarn/install-state.gz
    • .pnp.cjs
    • .pnp.loader.mjs
    • .pnpm-store
  • --logs Also remove common root log files:
    • npm-debug.log*
    • yarn-error.log*
    • pnpm-debug.log*
    • lerna-debug.log*
  • --editor Also remove editor folders (.vscode, .idea).
  • --tmp Also remove tmp and temp.
  • --all Include all optional cleanup categories above.
  • --keep-nm With --all, keep node_modules.
  • --help, -h Print usage and flags.
  • --version, -v Print the CLI version.

Examples

# Dry-run default cleanup
npx repo-clean --dry-run

# Remove default targets + node_modules
npx repo-clean --node-modules --force

# Prompted node_modules removal (confirm with y/yes)
npx repo-clean --node-modules

# Full cleanup except node_modules
npx repo-clean --all --keep-nm

# Print installed version
npx repo-clean --version

# Invalid (positional argument): exits with code 2
npx repo-clean my-folder

Issues and Support

  • Bug reports: https://github.com/arbenkryemadhi/repo-clean/issues/new
  • Feature requests: https://github.com/arbenkryemadhi/repo-clean/issues/new
  • General issues: https://github.com/arbenkryemadhi/repo-clean/issues

When opening an issue, include:

  • Your OS and Node.js version
  • The exact command you ran
  • The output you expected vs the output you got
  • A minimal repo structure that reproduces the behavior (if possible)

Contributing

Contributions are welcome.

  1. Fork the repository.
  2. Create a branch for your change.
  3. Make focused changes and update docs when behavior changes.
  4. Test with --dry-run and relevant flags.
  5. Open a pull request with a clear description.

Local development

git clone https://github.com/arbenkryemadhi/repo-clean.git
cd repo-clean
npm test
node ./bin/repo-clean.js --help
node ./bin/repo-clean.js --dry-run

Pull request checklist

  • Keep scope small and focused.
  • Preserve existing CLI behavior unless intentionally changing it.
  • Update README for any user-facing flag or behavior changes.
  • Add reproducible steps in the PR description.