inspect

npm outdated

Compares installed versions against the registry and reports which packages have a newer version available in current/wanted/latest columns. `wanted` respects your semver range, `latest` is the newest published.

npm outdated [<pkg>...] [--long] [--global]

Common flags

Flag Purpose
--long (-l) Show extra columns including package type
--json Emit machine-readable JSON
--global (-g) Check globally-installed packages
--all Include nested dependencies, not just top-level

Examples

npm outdated

Show all top-level packages with newer versions available

npm outdated --long

Include type (dependencies/devDependencies) column

npm outdated -g --depth=0

Check outdated global packages

Gotcha

`wanted` is what `npm update` would install; `latest` may be a major bump you must accept manually with `npm install pkg@latest`. Exits with code 1 when anything is outdated — keep that in mind for CI.

Related commands

← All npm commands · npm vs pnpm vs Yarn · Fix Node OOM