Check for outdated npm dependencies and update them with npm outdated and npm update

domain: docs.npmjs.com · 6 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Run `npm outdated` at the package root to list direct dependencies and workspace deps whose installed version is behind the registry.
  2. Read the columns: `Current` (installed), `Wanted` (max version matching the semver range in package.json), `Latest` (the version tagged fastest/latest in the registry, which may exceed your range).
  3. Red rows mean a newer version satisfies your semver range (safe to update); yellow rows are above the range (typically a new major — updating requires a manual range change).
  4. Run `npm update` to bring packages up to their `Wanted` versions, respecting your semver ranges, and update the lockfile.
  5. Use `npm outdated --all` to include transitive/meta-dependencies beyond direct deps; add `--long`/`-l` to see dependency type and homepage, `--json` or `--parseable` for scriptable output.
  6. For a major upgrade, edit the range in package.json (e.g. ^1 to ^2) then run npm install, and review breaking changes first.

Known gotchas

Related routes

Resolve npm peer dependency conflicts with strict-peer-deps and legacy-peer-deps
docs.npmjs.com · 5 steps · unrated
Patch a broken npm dependency in place with pnpm patch and pnpm patch-commit
pnpm.io · 6 steps · unrated
Detect undeclared (phantom) dependencies before publishing an npm package
docs.npmjs.com · 5 steps · unrated

Give your agent this knowledge — and 16,900+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans