Checking Outdated Dependencies (`npm outdated`)
Complete guide to analyzing outdated dependencies with npm outdated and pnpm outdated, interpreting Current, Wanted, and Latest columns, and automation.
The npm outdated command inspects your project dependencies against the npm registry and displays a table of all installed packages that have newer versions available.
Running the Command
# npm
npm outdated
# pnpm
pnpm outdatedInterpreting the Output
Package Current Wanted Latest Location Dep Type
zod 3.22.4 3.23.8 3.23.8 my-app dependencies
next 14.2.5 14.2.14 15.0.0 my-app dependencies
typescript 5.4.5 5.6.2 5.6.2 my-app devDependenciesColumn Definitions:
Current: The version currently installed on disk in./node_modules.Wanted: The maximum version that satisfies the SemVer constraint declared in yourpackage.json(e.g.^14.2.5permits14.2.14).Latest: The highest version published on the npm registry, even if it requires a major version upgrade (e.g. Next.js 15).Location: The workspace or path where the package resides.
What Actions to Take
- If
Current < Wanted: Runnpm updateto safely pull in bug fixes and minor features without risk of breaking changes. - If
Wanted < Latest: A new Major version exists. Check the library's migration guide / changelog before upgrading manually:npm install next@latest react@latest react-dom@latest
Automated Dependency Updates
In production teams, automated bots handle checking and opening Pull Requests for outdated packages:
- Dependabot: Built directly into GitHub.
- Renovate Bot: Highly configurable dependency automation for monorepos and enterprise teams.
Related Guides
Updating Packages Safely
Complete guide to updating dependencies with npm update, pnpm update, handling major version breaking changes, and using interactive update CLI tools.
Security Auditing (`npm audit`)
Complete guide to vulnerability scanning with npm audit and pnpm audit, severity levels (low, moderate, high, critical), npm audit fix, and handling overrides.