Skip to content

nvm on this Mac holds eight Node versions and 4.5 GB

Every Node version you ever installed is still there, and one of them is usually far larger than the rest. How to see which, and remove the dead ones.

5 min read

Version managers are designed to never throw anything away, which is the correct default and also the reason nobody notices the cost. Installing a Node version takes one command. Removing one takes a command nobody has ever run.

Why one version is enormous and the rest are not

A Node install is roughly 200 to 400 MB. Anything much larger than that is not Node, it is what you installed globally into it. Every npm install -g lands inside the version that was active at the time, so the version you use daily accumulates command line tools while the others stay at their shipping size.

That matters for how you clean up. Removing six old versions reclaims a bit over a gigabyte. Finding out what is inside the big one is the more interesting number:

du -sh ~/.nvm/versions/node/*
du -sh ~/.nvm/versions/node/*/lib/node_modules/* 2>/dev/null | sort -h | tail -10

Deciding what to remove

List what is installed and what each project actually asks for:

nvm ls
cat ~/**/.nvmrc 2>/dev/null | sort -u

The second line prints every Node version pinned by a project on your Mac. Anything installed that is not in that list, and is not your default, is a candidate. Old major versions are the obvious ones: a v10 install from years ago is not going to be asked for again by anything you still work on.

nvm uninstall v10.24.1

That removes the version cleanly, including anything installed globally into it. It is worth remembering that second part, because a global tool you use will vanish with the version that hosted it.

The cache alongside it

nvm also keeps the downloaded archives it installed from, in ~/.nvm/.cache. They are only useful if you plan to reinstall the same version offline, and clearing them costs a redownload:

du -sh ~/.nvm/.cache 2>/dev/null
nvm cache clear

Where this sits against everything else

Node versions are one line in a longer list. On the same Mac, ~/.npm was larger again, and the pattern repeats across every language toolchain installed. The npm cache explains what is inside that one and the command that reclaims most of it, and node_modules across projects is usually larger than both put together.

Common questions

How much space does nvm use?

Roughly 200 to 400 MB per Node version, plus whatever you installed globally into each one. On a working Mac measured in September 2026, eight versions came to 4.5 GB, and 3.2 GB of that was inside the single version in daily use because of globally installed tools.

How do I remove old Node versions installed with nvm?

Run nvm ls to see what is installed, then nvm uninstall followed by the version, for example nvm uninstall v10.24.1. This also removes anything installed globally into that version, so check for command line tools you rely on first.

Where does nvm store Node versions on a Mac?

In ~/.nvm/versions/node, one folder per version, with downloaded archives cached in ~/.nvm/.cache. Both are hidden folders in your home directory, which is why they rarely show up when people look for what is using space.

Why is one Node version so much bigger than the others?

Because npm install -g puts packages inside whichever Node version is active, so your daily version collects every global tool you have ever installed while the others stay at their original size. Listing lib/node_modules inside that version shows what is there.

Read next