[npm] How to remove packages not in package.json from node_modules

Tadashi Shigeoka ·  Thu, March 22, 2018

To remove packages not listed in package.json from the node_modules directory, use the npm prune command.

npm | エヌピーエム
npm prune

That’s all from the Gemba where I wanted to remove unnecessary packages from node_modules with npm prune.