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

@mitian233/devcleaner

v1.0.0

Published

CLI tool to clean development tool caches on Windows with TUI interface

Downloads

55

Readme

DevCleaner

⚠️ Windows Only: This tool is designed specifically for Windows. It targets Windows-specific paths and tools like Scoop, Winget, Chocolatey, and NuGet.

A powerful CLI tool for cleaning cache files generated by development tools on Windows, featuring a modern TUI interactive interface.

Features

  • Modern TUI Interface - Elegant interactive experience using @clack/prompts
  • Smart Detection - Automatically detect installed development tools and their caches
  • Efficient Cleaning - Prioritizes using tool's built-in cleaning commands for safety
  • Statistics - Before/after comparison showing cleaning results
  • Risk Warnings - Labels high-risk operations to prevent accidental deletion of important files

Supported Cleaning Tools

Package Managers

  • npm - npm cache clean --force
  • Yarn - yarn cache clean
  • pnpm - pnpm store prune

Programming Languages / Build Tools

  • pip - pip cache purge
  • Gradle - Manual cache directory deletion
  • Maven - Manual repository directory deletion (high risk)
  • Cargo - cargo cache -a or manual deletion
  • NuGet - dotnet nuget locals all --clear
  • Go - go clean -cache

System Cache

  • System Temporary Files - %LOCALAPPDATA%\Temp

Requirements

  • Windows (PowerShell or Command Prompt)
  • Node.js >= 18

Installation

# Using npx (no installation required)
npx devcleaner

# Global installation
npm install -g devcleaner
devcleaner

# Using pnpm
pnpm add -g devcleaner
devcleaner

Usage

Run the command:

devcleaner

Or use npx directly:

npx devcleaner

The program will automatically:

  1. Detect installed development tools in the system
  2. Scan cache directory sizes for each tool
  3. Display cache list for selection
  4. Prompt confirmation for high-risk operations
  5. Execute cleaning and display statistics report

Usage Example

┌  DevCleaner - Development Tool Cache Cleaner
│
◇  Detection complete
│
◆  Select caches to clean (Space to select, Enter to confirm)
│  ◻ npm Cache - 1.38 MB (✓ Low Risk)
│  ◻ pip Cache - 641.00 B
│  ◻ Gradle Cache - 749.65 MB
│  ◻ NuGet Packages - 649.11 KB
│  ◻ System Temp - 253.11 MB

Risk Levels

  • 🟢 Low Risk - Automatically regenerated after cleaning, no side effects
  • 🟡 Medium Risk - May need to rebuild project after cleaning
  • 🔴 High Risk - Need to re-download dependencies after cleaning (e.g., Maven repository)

Tech Stack

  • TypeScript - Type-safe development experience
  • @clack/prompts - Modern TUI interaction library
  • execa - Powerful process execution tool
  • picocolors - Terminal color library

Project Structure

DevCleaner/
├── src/
│   ├── index.ts          # CLI entry and TUI interaction
│   ├── types.ts          # TypeScript type definitions
│   ├── tools/            # Cleaner implementations for each tool
│   │   ├── base.ts       # Base cleaner class
│   │   ├── npm.ts        # npm cleaner
│   │   ├── yarn.ts       # yarn cleaner
│   │   └── ...           # Other cleaners
│   └── utils/            # Utility functions
│       ├── size.ts       # Directory size calculation
│       ├── execute.ts    # Command execution
│       └── format.ts     # File system operations
├── dist/                 # Compiled output
├── package.json
└── tsconfig.json

How It Works

  1. Detection Phase

    • Check if cache directories for each development tool exist
    • Calculate cache directory sizes
    • Detect if cleaning commands are available
  2. Cleaning Phase

    • Prioritize using tool's built-in cleaning commands (e.g., npm cache clean)
    • If no cleaning command available, safely delete cache directory
    • Calculate space difference before and after cleaning
  3. Reporting Phase

    • Display cleaning results for each tool
    • Statistics of total space freed

Safety

  • ✅ Only cleans known safe directories
  • ✅ High-risk operations require double confirmation
  • ✅ Prioritizes using tool's built-in cleaning commands
  • ✅ Detailed error handling and logging

Development

# Clone the repository
git clone <repository-url>
cd DevCleaner

# Install dependencies
pnpm install

# Run in development mode
pnpm dev

# Build
pnpm build

FAQ

Q: What to do after cleaning Maven repository?

A: After Maven repository is cleaned, dependencies will be automatically re-downloaded during the next build. It's recommended to do this in a good network environment.

Q: Why are some tools not detected?

A: The tool may not be installed, or the cache directory doesn't exist or is empty.

Q: What if the project build fails after cleaning?

A: Most caches can be rebuilt after cleaning. If you encounter issues, try cleaning the project's node_modules and other directories.

License

MIT