To uninstall the nodeNode.js module:
npm uninstall <module_name> This will remove the module from node_modulesfolder node_modules, but not from package.jsonfile package.json. So when we do npm install again it will download the module.
So to remove the module from package.jsonfile package.json, use:
npm uninstall <module_name> --save This also deletedeletes the dependency from package.jsonfile package.json.
And if you want to uninstall any globally module you can use:
npm -g uninstall <module_name> --save This will deletedelete the dependency globally.