NPM — How to Uninstall Packages

NPM has large ecosystem of JavaScript modules. During development, you may add dependencies to your project and may not need them anymore at a later point.

Using the NPM CLI to install dependencies will add the module to your project dependencies by adding it to your package.json file. In situations where the dependency doesn’t fit, you still have it in the package.json.

Clean up not needed packages with the following command:

npm uninstall <package-name>  

This will remove the dependency from your project’s package.json file and also the locally installed version in your node_modules folder.

Enjoy!

Explore the Library

Find interesting tutorials and solutions for your problems.