Updating Packages in NPM

From the NPM Package Manager cheat sheet · Package Management · verified Jul 2026

Updating Packages

Keep dependencies up to date

bash
# Check outdated packages
npm outdated
npm outdated -g  # Global packages

# Update package
npm update express
npm update  # Update all packages

# Update to latest (ignoring semver)
npm install express@latest

# Interactive update
npx npm-check -u
npx npm-check-updates

# Update package.json version ranges
npx npm-check-updates -u
npm install  # Install updated versions
💡 npm update respects semver ranges in package.json
⚠️ audit fix --force may introduce breaking changes
📌 Use npm-check-updates for major version updates
🟢 Essential - Keep dependencies secure and updated
⚡ npm dedupe reduces duplication in node_modules
updatemaintenance

More NPM tasks

Back to the full NPM Package Manager cheat sheet