Reputation: 63395
I added a couple of libraries to my package.json file, but now I found out I no longer need them
Is there some command line parameter to pass to npm install
to tell it to remove no longer needed packages? that is, those packages in node_modules that are no longer in package.json
Or shall I just remove the node_modules folder and run npm install
once again... (I was hoping for a smarter solution)
--
I found out that npm ls
correctly recognizes no longer needed libraries as extraneous
Upvotes: 1
Views: 110
Reputation: 47993
You can do npm prune
to remove extraneous packages. Link to docs.
Upvotes: 2