Update npm 5:
As of npm 5.0.0, installed/uninstalled modules are added/removed as a dependency by default, so the --save option is no longer needed.
run
npm uninstall <package> for example:
npm uninstall mongodb It will remove the module from node_modules folder and package.json file also