Use `npm uninstall` to uninstall the npm package.

How to uninstall npm Node package locally or globally

To uninstall previously installed packageslocal(usenpm install <package-name>insidenode_modulesFolder, run

npm uninstall <package-name>

From the project root folder (the folder containing the node_modules folder).

use-SMark, or--save, This action will also deletepackage.jsonfile.

If the package is a development dependency, thenpackage.jsonFile, you must use-D/--save-devFlag to remove it from the file:

npm uninstall -S <package-name>
npm uninstall -D <package-name>

If the package is installedglobal wide, You need to add-g/--globalbanner:

npm uninstall -g <package-name>

E.g:

npm uninstall -g webpack

Since the folder you are currently in does not matter, you can run this command from anywhere on the system.

Download mine for freeNode.js manual


More node tutorials: