Skip to content

A web developer's Mac, measured: Node was installed three times

Where a web developer's disk goes: node_modules, npm caches, several Node installs, browsers and build output. Measured totals and what to clear first.

7 min read

A web developer's disk fills with the same few things, in roughly the same order, whatever the framework. This is the order, with numbers from one real Mac.

The measured list

WhatSizeGuide
node_modules in every project7.7 GBnode_modules
Chrome, profiles and cache10.8 GBChrome
npm download cache2.5 GBnpm cache
npx cache2.4 GBnpx cache
Node versions under nvm4.5 GBnvm
Global npm packages2.4 GBglobal packages
Build output in projects4.6 GBfrontend build caches
Yarn and pnpm stores1.5 GBYarn and pnpm
Playwright browsers0.5 GBPlaywright

Three Node installs

The finding worth repeating from this Mac: Node was installed three separate ways. nvm held eight versions from 10.24.1 to 24.9.0. The n version manager had put 22.14.0 in /usr/local. Homebrew had installed 23.11.0. Each keeps its own global packages, so every globally installed tool existed up to three times, and the shell only ever used one of them.

which -a node
ls ~/.nvm/versions/node 2>/dev/null
ls /usr/local/n/versions/node 2>/dev/null
brew list --versions node 2>/dev/null

Pick one manager and remove the others. Version managers taking up space compares them.

The browser is a dev tool too

Chrome was the largest single app footprint on this Mac: 7.0 GB of profile data across 14 profiles and 3.8 GB of cache. Test profiles for different accounts are the usual cause. Service worker storage from local development builds is a large part of it, and the Chrome guide covers clearing it.

A monthly routine

npm cache clean --force
rm -rf ~/.npm/_npx
pnpm store prune 2>/dev/null
yarn cache clean 2>/dev/null

# node_modules in projects untouched for 90 days
find ~/Documents -name node_modules -type d -prune -mtime +90 2>/dev/null

The broader routine is in a monthly Mac cleanup and the whole developer setup in Mac storage setup for developers.

Related: Dash docsets taking up space on Mac.

Common questions

What takes the most space on a web developer's Mac?

On the Mac measured, browser data and node_modules, followed by npm caches and multiple Node installs.

Why do I have several versions of Node installed?

Because Node can arrive through nvm, n, Homebrew and the official installer, and each keeps its own copies and global packages.

Is it safe to delete node_modules in old projects?

Yes. It is rebuilt by npm install from the lockfile when you need the project again.

How often should a web developer clean their Mac?

Monthly is enough for most. Package caches and old node_modules are where the regular gains are.

Read next