npm outdated: Usage, Options & Output
See which dependencies are behind - and by how much.
npm outdated reports installed packages with newer versions available, distinguishing the highest in-range version (Wanted) from the absolute latest.
What it does
Prints a table of Current / Wanted / Latest for each dependency that has an update. Wanted is the newest version your package.json range allows; Latest is the newest published. It exits with code 1 when anything is outdated, which matters in CI.
Common usage
npm outdated # table of outdated deps
npm outdated --json # machine-readable output
npm outdated --long # include dependency type
npm outdated -g # outdated global packagesCommon CI gotcha: nonzero exit fails the job
A CI step running npm outdated unexpectedly fails the job, because npm outdated exits 1 whenever updates exist - it is not an error, just a signal. If you only want a report, swallow the exit code so it does not break the pipeline.
npm outdated || true # report without failing the job