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

assetdrain

v1.0.15

Published

🧹 A blazing-fast CLI to detect and clean unused assets from your codebase with interactive UX.

Readme

🧹 assetdrain

npm > downloads > license

Find and remove unused images, icons, and media files from your codebase — with a sleek, interactive CLI. Feels like Vite. Cleans like a Roomba.


🚀 What is this?

A blazing-fast CLI tool that scans your repo for assets (like .svg, .png, .mp4, etc.), checks where they're actually used in code, and tells you what you can delete — or deletes it for you 🫡.


🎯 Features

  • ✅ Scans for unused images, gifs, videos, or any custom extensions
  • 🎯 Works with any file structure (Next.js app router, traditional src/, etc.)
  • 🧠 Skips false positives by ignoring asset references inside comments — so if // public/file.svg is just sitting there unused, assetdrain will still flag it ✅
  • 🔥 Interactive prompts (select file types, code extensions, actions)
  • ✨ Export to CSV/JSON
  • 🚨 Safe modes like dry-run and delete confirmation

🛠️ Installation

npm install -g assetdrain

or use directly:

npx assetdrain [asset-folder]

🧪 Usage

npx assetdrain [asset-folder]

Example:

npx assetdrain public

This will scan all supported asset files in ./public/, match against code in your entire repo, and show unused ones.


⚙️ Modes

? What would you like to do?
✔ Scan and Review (Default)
  Scan Only
  Scan and Delete Automatically (At your own risk)
  • Scan and Review – Shows unused files and asks if you want to delete
  • Scan Only – Just shows unused files, safe mode
  • Scan and Delete Automatically – 🚨 Deletes immediately, no questions asked

📦 Export

After the scan:

? Would you like to export the report?
✔ Yes (CSV)
  Yes (JSON)
  No
  • Includes: filename, usage status, deletion status
  • Saved to: assetdrain-report.json / assetdrain-report.csv

🧑‍💻 Author

Built with ❤️ by Vedant Sonkar

Open to contributions, ideas, and collabs. Feel free to reach out!


🐞 Issues / Bugs / Feature Requests

If assetdrain misbehaves or you're dreaming up a feature: 👉 Open an issue


🧾 License

MIT. You can clone it, fork it, break it, and improve it 😄


⚠️ Disclaimer

assetdrain is provided "as-is" without any warranties. Use it at your own risk.

By using this tool, you agree that the author (Vedant Sonkar) is not responsible for any accidental deletions, data loss, or damage caused by the use (or misuse) of this software.

Always double-check the unused asset list before confirming deletions — especially in Scan and Delete Automatically mode.


🤝 Contributing

PRs welcome! If you have an idea, bug report, or want to collaborate on features, open an issue or fork the repo.