In npm-cache directory, what are the folders other than _cacache for?

5.8k Views Asked by At

Navigating to npm cache directory, Users/UserName/%AppData%/Roaming/npm-cache in windows for example, I see so many folders. What are they for? When were they created and how can I remove them by npm cli? (I know the _cacache folder is for local cache of npm, so what stuff do other folders serve?)

1

There are 1 best solutions below

0
On

npm-cache is part of the cli

npm stores cache data in an opaque directory within the configured cache, named _cacache

You would need to delete any npm cache manually (packages etc)

npm cache clean [<path>]

npm will not remove data by itself: the cache will grow as new packages are installed.

https://docs.npmjs.com/cli-commands/cache.html