In this tutorial, we are going to learn about how to uninstall all the npm packages in a project, locally or globally.
To uninstall a single package, we can use the
npm uninstall command followed by the package name.
npm uninstall body-parser
Similarly, we can uninstall the global installed package by adding a
npm -g uninstall nodemon
To uninstall the multiple packages, we can use the
npm uninstall command followed by multiple package names separated by the spaces
npm uninstall express cors
for global :
npm -g uninstall express cors