Skip to content

size

Measure physical disk used by node_modules directories. Reports per-directory totals and highlights the largest projects (top 9 by default).

bash
nodehunter size
nodehunter size ~/work
nodehunter size -p ~/work --full
nodehunter size ~/work --json

What you get

  • totalSizeBytes and human-readable rollups
  • Per-match sizes (via native du by default)
  • Largest project helpers in human output and JSON rollups

Options

Inherits discovery flags, global flags, and listing caps:

FlagDescription
--top <n>Max projects in ranked output (default 9)
--fullInclude every match, no cap
--no-duForce portable Node.js size walk (skip native du)
--concurrency <n>Parallel size lookups (default 8, max 32)

Sizing engine and cross-platform behavior: Platforms and sizing.

Examples

bash
# Top offenders in a workspace
nodehunter size ~/Projects

# Full inventory for a report
nodehunter size ~/Projects --full --json > report.json

# Faster sizing on many small trees
nodehunter size ~/work --concurrency 16

Before delete

Always run size (or delete interactively, which shows a preview) before removing trees. See Safety model and delete.