1The command is simply npm uninstall <name>
2// Here are different options:
3// - removes the module from node_modules but
4// does NOT update package.json
5npm uninstall <name>
6
7// - removes it from dependencies in package.json aswell
8npm uninstall <name> --save
9
10// - removes it from devDependencies in package.json aswell
11npm uninstall <name> --save-dev
12
13// - also removes it globally
14npm uninstall -g <name> --save
15
16// If you're removing a global package, however, any applications
17// referencing it will crash.
18
19// A local install will be in the node_modules/ directory of your
20// application. This won't affect the application if a module remains
21// there with no references to it.
22
23// The Node.js documents https://npmjs.org/doc/ have all the commands
24// that you need to know with npm.
1How to remove/uninstall Node.js from Windows:
21. Run npm cache clean --force
32. Uninstall from Programs & Features with the uninstaller.
43. Reboot (or you probably can get away with killing all node-related processes from Task Manager).
54. Look for these folders and remove them (and their contents) if any still exist. Depending on the version you installed, UAC settings, and CPU architecture, these may or may not exist:
6 C:\Program Files (x86)\Nodejs
7 C:\Program Files\Nodejs
8 C:\Users\{User}\AppData\Roaming\npm (or %appdata%\npm)
9 C:\Users\{User}\AppData\Roaming\npm-cache (or %appdata%\npm-cache)
10 C:\Users\{User}\.npmrc (and possibly check for that without the . prefix too)
11 C:\Users\{User}\AppData\Local\Temp\npm-*
125. Check your %PATH% environment variable to ensure no references to Nodejs or npm exist.
136. If it's still not uninstalled, type where node at the command prompt and you'll see where it resides -- delete that (and probably the parent directory) too.
147. Reboot, for good measure.