Alexander Mills
Alexander Mills

Reputation: 100476

NPM uninstall doesn't uninstall dependencies

I have noticed in some experiments that "$ npm uninstall --save --save-dev X", does not uninstall dependencies that only X depends on. Is there a way to uninstall all the modules that only X depends on when you run the above command?

Upvotes: 1

Views: 702

Answers (1)

v-andrew
v-andrew

Reputation: 24279

There is a command to remove unnecessary packages:

npm prune

https://docs.npmjs.com/cli/prune

Upvotes: 4

Related Questions