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

@lowdep/dep-size

v1.0.0

Published

Real disk footprint of npm dependencies — sorted by size, highlights direct deps, zero dependencies

Readme

dep-size

Zero dependencies Node License: MIT Platform

Real disk footprint of your npm dependencies — sorted largest first, direct deps highlighted.

npm outdated tells you what's old. npm audit tells you what's vulnerable. dep-size tells you what's eating your disk.


Why?

bundlephobia measures browser bundle size (after tree-shaking) — not disk size.
npm ls shows the dependency tree — not sizes.
du -sh node_modules/* is slow, Unix-only, and unsorted.

dep-size scans node_modules directly, sizes every package, and gives you a sorted, colorized breakdown in seconds. Works on Windows, Mac, and Linux. Zero dependencies.


Install

npm install -g dep-size

Or without installing:

npx dep-size

Usage

# Top 20 packages by disk size (default)
dep-size

# Top 50
dep-size --top 50

# Only packages larger than 5 MB
dep-size --min 5

# Only direct dependencies from package.json
dep-size --direct

# Analyze a subdirectory
dep-size ./backend

# Export to JSON
dep-size --json > sizes.json

Example Output

dep-size  my-app  /path/to/my-app/node_modules

238 packages · 312.4 MB · 48,291 files

  Package                                    Size    Files  % of total
  ─────────────────────────────────────────────────────────────────────────
● typescript                              42.31 MB    1247      13.5%  ████████████████░░
● @prisma/client                          31.18 MB     892      10.0%  ██████████████░░░░
  @esbuild/win32-x64                      28.44 MB       3       9.1%  █████████████░░░░░
● webpack                                 18.04 MB     645       5.8%  ████████░░░░░░░░░░
  acorn                                   12.30 MB     148       3.9%  ██████░░░░░░░░░░░░
● lodash                                  13.20 MB     605       4.2%  ██████░░░░░░░░░░░░
● react                                    2.18 MB      34       0.7%  █░░░░░░░░░░░░░░░░░
  … and 231 more packages

  ─────────────────────────────────────────────────────────────────────────
  TOTAL                                   312.4 MB   48,291

  ● = direct dependency in package.json
  Use --top N, --min <mb>, or --direct to filter.

Color Legend

| Color | Meaning | |---|---| | Red bar | > 15% of total | | Yellow bar | > 5% of total | | Gray bar | < 5% of total | | Green dot (●) | Direct dependency |


JSON Output

dep-size --json
{
  "directory": "/path/to/project",
  "totalPackages": 238,
  "totalSize": 327573504,
  "totalFiles": 48291,
  "packages": [
    {
      "name": "typescript",
      "size": 44368076,
      "files": 1247,
      "direct": true
    }
  ]
}

License

MIT


Keywords

node_modules size · package size · dependency size · disk usage · heaviest packages · npm package size · bundle weight · analyze node_modules · zero dependencies · cli


Built to solve, shared to help — Rushabh Shah 🛠️✨

One of 40+ zero-dependency developer CLI tools — no node_modules, ever.