// update npm//
npm install -g npm@latest
npm i -g npm-upgrade
# to install
npm install -g npm-check-updates
# to use
npx npm-check-updates -u
npm install
npm update -g
npm install -g npm@latest
#may require the use of sudo depending on your distro
sudo npm install -g npm@latest
npm i -g npm@latest
// update npm//
npm install -g npm@latest
npm install -g npm
// update npm to latest version //
npm install -g npm@latest
sudo npm install -g npm
npm install -g npm-check-updates
ncu //to check update
ncu -u //to update package
ncu -g //to check global package
npm-upgrade
npm install -g npm-upgrade
$npm update
// update node package manager
npm install -g npm@latest
// -g = global
// npm@latest = latest version
npm update -g npm
npm update -g <package_name>
npm config get prefix -g
Use npm|yarn outdated to see which modules have newer versions
Use npm update|yarn upgrade (without a package name) to update all modules
Include --save-dev|--dev if you want to save the newer version numbers to your package.json. (NOTE: as of npm v5.0 this is only necessary for devDependencies).
Use npm install package@major-version to update to major version
npm outdated -g --depth=0
npm update [-g] [<pkg>...]
npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz