To uninstall and remove from package.json and node_modules run
npm rm <package>.
Sometimes it can happened that node package in not needed anymore, and we might remove it from package.json. To make sure this package is also removed from node_modules as well, run
To uninstall global package, run
npm rm -g <package>