Skip to main content
On this page

Checking for outdated dependencies Jump to heading

The outdated subcommand checks for new versions of NPM and JSR dependencies listed in deno.json or package.json files, and displays dependencies that could be updated. Workspaces are fully supported, including workspaces where some members use package.json and others use deno.json.

For example, take a project with a deno.json file:

deno.json
{
  "imports": {
    "@std/fmt": "jsr:@std/fmt@^1.0.0",
    "@std/async": "jsr:@std/async@1.0.1",
    "chalk": "npm:chalk@4"
  }
}

and a lockfile that has @std/fmt at version 1.0.0.

›_
deno outdated
┌────────────────┬─────────┬────────┬────────┐
│ Package        │ Current │ Update │ Latest │
├────────────────┼─────────┼────────┼────────┤
│ jsr:@std/fmt   │ 1.0.0   │ 1.0.3  │ 1.0.3  │
├────────────────┼─────────┼────────┼────────┤
│ jsr:@std/async │ 1.0.1   │ 1.0.1  │ 1.0.8  │
├────────────────┼─────────┼────────┼────────┤
│ npm:chalk      │ 4.1.2   │ 4.1.2  │ 5.3.0  │
└────────────────┴─────────┴────────┴────────┘

The Update column lists the newest semver-compatible version, while the Latest column lists the latest version.

Notice that jsr:@std/async is listed, even though there is no semver-compatible version to update to. If you would prefer to only show packages that have new compatible versions you can pass the --compatible flag.

›_
deno outdated --compatible
┌────────────────┬─────────┬────────┬────────┐
│ Package        │ Current │ Update │ Latest │
├────────────────┼─────────┼────────┼────────┤
│ jsr:@std/fmt   │ 1.0.0   │ 1.0.3  │ 1.0.3  │
└────────────────┴─────────┴────────┴────────┘

jsr:@std/fmt is still listed, since it could be compatibly updated to 1.0.3, but jsr:@std/async is no longer shown.

Updating dependencies Jump to heading

The outdated subcommand can also update dependencies with the --update flag. By default, it will only update dependencies to semver-compatible versions (i.e. it won't update to a breaking version).

›_
deno outdated --update
Updated 1 dependency:
 - jsr:@std/fmt 1.0.0 -> 1.0.3

To update to the latest versions (regardless of whether it's semver compatible), pass the --latest flag.

›_
deno outdated --update --latest
Updated 3 dependencies:
 - jsr:@std/async 1.0.1 -> 1.0.8
 - jsr:@std/fmt   1.0.0 -> 1.0.3
 - npm:chalk      4.1.2 -> 5.3.0

Selecting packages Jump to heading

The outdated subcommand also supports selecting which packages to operate on. This works with or without the --update flag.

›_
deno outdated --update --latest chalk
Updated 1 dependency:
 - npm:chalk 4.1.2 -> 5.3.0

Multiple selectors can be passed, and wildcards (*) or exclusions (!) are also supported.

For instance, to update all packages with the @std scope, except for @std/fmt:

›_
deno outdated --update --latest "@std/*" "!@std/fmt"
Updated 1 dependency:
 - jsr:@std/async 1.0.1 -> 1.0.8

Note that if you use wildcards, you will probably need to surround the argument in quotes to prevent the shell from trying to expand them.

Updating to specific versions Jump to heading

You can also select a specific version to update to by appending it after @.

›_
deno outdated --update chalk@5.2 @std/async@1.0.6
Updated 2 dependencies:
 - jsr:@std/async 1.0.1 -> 1.0.6
 - npm:chalk      4.1.2 -> 5.2.0

Workspaces Jump to heading

In a workspace setting, by default outdated will only operate on the current workspace member.

For instance, given a workspace:

deno.json
{
  "workspace": ["./member-a", "./member-b"]
}

Running

›_
deno outdated

from the ./member-a directory will only check for outdated dependencies listed in ./member-a/deno.json or ./member-a/package.json.

To include all workspace members, pass the --recursive flag (the -r shorthand is also accepted).

›_
deno outdated --recursive
deno outdated --update --latest -r
Command line usage:
outdated

Find outdated dependencies

Options Jump to heading

Load certificate authority from PEM encoded file.

--compatible
Jump to heading

Only consider versions that satisfy semver requirements.

Configure different aspects of deno including TypeScript, linting, and code formatting. Typically the configuration file will be called deno.json or deno.jsonc and automatically detected; in that case this flag is not necessary.

Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten, so if variables with the same names already exist in the environment, their values will be preserved. Where multiple declarations for the same environment variable exist in your .env file, the first one encountered is applied. This is determined by the order of the files you pass as arguments.

--frozen-lockfile
Jump to heading

Error out if lockfile is out of date.

Load import map file from local file or remote URL.

--interactive, -i
Jump to heading

Interactively select which dependencies to update.

Consider the latest version, regardless of semver constraints.

Check the specified lock file. (If value is not provided, defaults to "./deno.lock").

--lockfile-only
Jump to heading

Install only updating the lockfile.

--min-dep-age
Jump to heading

(Unstable) The age in minutes, ISO-8601 duration or RFC3339 absolute timestamp (e.g. '120' for two hours, 'P2D' for two days, '2025-09-16' for cutoff date, '2025-09-16T12:00:00+00:00' for cutoff time, '0' to disable).

Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored.

--no-config
Jump to heading

Disable automatic loading of the configuration file.

Disable auto discovery of the lock file.

Do not resolve npm modules.

--no-remote
Jump to heading

Do not resolve remote modules.

--node-modules-dir
Jump to heading

Selects the node_modules directory mode for npm packages (not a path). One of: auto (create a local node_modules directory and install npm packages into it), manual (use the existing local node_modules directory, do not modify it), none (do not use a local node_modules directory; resolve npm packages from the global cache). Defaults to auto when the flag is passed without a value.

--node-modules-linker
Jump to heading

Sets the linker mode for npm packages (isolated or hoisted).

--recursive, -r
Jump to heading

Include all workspace members.

--reload, -r
Jump to heading

Reload source code cache (recompile TypeScript). With no value, reloads everything. Pass a comma-separated list of specifiers to reload only those modules; npm: reloads all npm modules; npm:chalk reloads a single npm module; jsr:@std/http/file-server,jsr:@std/assert/assert-equals reloads specific modules.

--unsafely-ignore-certificate-errors
Jump to heading

DANGER: Disables verification of TLS certificates.

--update, -u
Jump to heading

Update dependency versions.

Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages.

Last updated on

Did you find what you needed?

Edit this page
Privacy policy