https://www.npmjs.com/package/npm-check
list the unused packages in package.json
#install
npm install -g npm-check
#use
npm-check
https://docs.npmjs.com/cli/prune
removes the node_modules unlisted in package.json
npm prune
https://docs.npmjs.com/cli/publish
npm publish [< tarball >|< folder >] [--tag < tag >] [--access < public|restricted >] [--otp otpcode]
Publishes '.' if no argument supplied
Sets tag 'latest' if no --tag specified
https://docs.npmjs.com/cli/version
npm version [< newversion > | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]
'npm [-v | --version]' to print npm version
'npm view <pkg> version' to view a package's published version
'npm ls' to inspect current package/dependency versions
The newversion argument should be a valid semver string, a valid second argument to semver.inc (one of patch, minor, major, prepatch, preminor, premajor, prerelease), or from-git.
In the second case, the existing version will be incremented by 1 in the specified field. from-git will try to read the latest git tag, and use that as the new npm version.