Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.
To uninstall a package you have previously installed locally (using npm install <package-name>), run
npm uninstall <package-name>
from the project root folder (the folder that contains the node_modules folder).
This operation will also remove the reference in the package.json file.
If the package was a development dependency, listed in the devDependencies of the package.json file, you must use the -D / --save-dev flag to remove it from the file:
npm uninstall -D <package-name>
If the package is installed globally, you need to add the -g / --global flag:
npm uninstall -g <package-name>
for example:
npm uninstall -g webpack
You can run this from any directory.