npm: Uninstall Local and Global Packages


Uninstalling Local Packages

You can remove a package from you node_modules directory using npm uninstall <package>:

npm uninstall lodash

To remove it from the dependencies in package.json, you will need to use the save flag:

npm uninstall --save lodash

Uninstalling Global Packages

Global packages can be uninstalled with npm uninstall -g <package>:

npm uninstall -g jshint

Source: Uninstalling Local and Global Packages