Description
Calculates and displays the size of node_modules folders in the current directory and subdirectories. Sizes will be smaller than actual file size taken on disk. The tool calculates actual file size rather than file size on disk (related to disk blocks usage).Usage
Examples
Flags
Working directory for the command
Help for dirs-size
Use Cases
Disk Space Management
Understand how much disk space your node_modules directories are consuming.
Monorepo Analysis
Calculate the total size of all node_modules directories in a monorepo.
Pre-Optimization Measurement
Measure size before running deduplication to quantify potential savings.
The reported size is the actual file size, not the disk space used (which accounts for block allocation). The actual disk usage may be higher.
Related Commands
- node-modules installed-duplicates - Use
--size-statsto see before/after optimization sizes
