Theme
FeaturesHow It WorksPricingBlogSign In to Dashboard →Download Mac App
← All posts
Developer Toolchain

node_modules Taking Up Space on Mac: Find and Delete Them All

The Silo Team · 5 min read · September 24, 2026

How Much Space Is node_modules Actually Using?

Run this to find out:

find ~ -name "node_modules" -type d -prune -exec du -sh {} \; 2>/dev/null | sort -hr

For most active developers, this reveals 10–40 GB spread across dozens of projects, many of which haven't been touched in months or years.

The Safe Approach: Only Delete Orphaned Directories

The key distinction: don't delete node_modules from projects you're actively working on. Target:

  • Projects in directories with no git commits in 6+ months
  • Cloned repos you were just exploring
  • Tutorial projects
  • Projects that have a package.json but whose repo is archived on GitHub

Using npkill for Interactive Cleanup

npx npkill

npkill shows an interactive list of all node_modules directories with sizes, letting you delete them one by one with the spacebar. It's safe and reversible (you can always run npm install to restore any deleted modules).

Clear Package Manager Caches Too

# npm cache
npm cache clean --force
du -sh ~/.npm/_cacache

# yarn v1 cache
yarn cache clean

# pnpm store
pnpm store prune

# Check pnpm store size
du -sh ~/.local/share/pnpm/store

MacPilot's Orphaned node_modules Scanner

MacPilot traverses your home directory and developer workspace, building a list of node_modules directories ranked by size. It cross-references each against its parent project's last Git commit date to identify stale candidates — giving you confidence about what's safe to delete.

See it on your own Mac.

Download Silo and find out where your space is going.

Download Silo →

Keep reading

Silo Support Desk

Help & Feedback

Send a message to our engineering team. We typically respond within 12 hours.

Direct email support: sparoconnect@gmail.com