npm uninstall --save <package_name>
npm un <package_name>
npm uninstall <module_name>
npm uninstall -g <package_name>
npm uninstall -g <module_name> //to uninstall globally
BASH
copy
npm uninstall <package-name>
To uninstall a package you have previously installed locally:
npm uninstall <package-name>
To uninstall a package you have previously installed globally:
npm uninstall -g <package-name>
// Node.js
// create package.json
% npm init
// install package
% npm install express --save
// Delete package
% npm uninstall express --save
npm uninstall -g <@scope/package_name>
npm uninstall -D package-name or npm uninstall --save-dev package-name
I have tried uninstalling global packages in several ways.
npm uninstall -g <package_name> this didn't work.
I managed to remove the global packages in the following way:
Goto terminal
Run this command npm list -g
Goto the path (C:UsersuserAppDataRoaming
pm)
Delete all the related files to your package
Goto node_modules find and delete the package
This should work.
npm ls -gp --depth=0 | awk -F/ '/node_modules/ && !//npm$/ {print $NF}' | xargs npm -g rm