xxxxxxxxxx
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:\Users\user\AppData\Roaming\npm)
Delete all the related files to your package
Goto node_modules find and delete the package
This should work.
xxxxxxxxxx
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>
xxxxxxxxxx
// Node.js
// create package.json
% npm init
// install package
% npm install express --save
// Delete package
% npm uninstall express --save