Trong Lam Phan Trong Lam Phan - 1 year ago 133
JSON Question

Npm remove all packages that no more exist in package.json

I'd like to remove all packages (in node_modules) that no more exist in package.json (these packages' name have been removed by another developer and the package.json file is modified on git).

How can i do that ?

Thanks !

Answer Source

Use following command:

npm prune

Description can be found here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download