Skip to main content
The deno upgrade command upgrades your Deno installation to a newer version.

Usage

deno upgrade [OPTIONS] [VERSION_OR_HASH_OR_CHANNEL]

Description

Upgrades the Deno executable to the latest version or a specified version. By default, it downloads and installs the latest stable release. The command supports different release channels (stable, canary, rc, lts) and can upgrade to specific versions.

Arguments

VERSION_OR_HASH_OR_CHANNEL
string
Specify a version, git hash (for canary), or channel name. Can be:
  • A version number (e.g., 1.40.0)
  • A git commit hash (for canary builds)
  • A channel name: stable, canary, rc, or lts

Options

--version
string
The version to upgrade to (e.g., 1.40.0).
--output
string
The path to output the updated executable to. Defaults to the current Deno executable path.
--dry-run
boolean
default:"false"
Perform all checks without actually upgrading.
--force
boolean
default:"false"
Force upgrade even if already on the latest version.
--canary
boolean
default:"false"
Upgrade to the latest canary build.
--release-candidate
boolean
default:"false"
Upgrade to the latest release candidate.
--checksum
string
Verify the download with this SHA-256 checksum.

Release Channels

Stable

The default release channel with thoroughly tested, production-ready versions.
deno upgrade
deno upgrade stable
deno upgrade 1.40.0

Canary

Nightly builds from the main branch with the latest features.
deno upgrade canary
deno upgrade --canary
deno upgrade 5c69b4861b52ab406e73b9cd85c254f0505cb20f

Release Candidate (RC)

Pre-release versions for testing upcoming major releases.
deno upgrade rc
deno upgrade --release-candidate
deno upgrade 2.0.0-rc.0

LTS (Long Term Support)

Versions with extended support for stability-focused users.
deno upgrade lts

Examples

Upgrade to latest stable version

deno upgrade

Upgrade to a specific version

deno upgrade 1.40.0
or
deno upgrade --version 1.40.0

Upgrade to the latest canary build

deno upgrade canary

Upgrade to a specific canary build

deno upgrade 5c69b4861b52ab406e73b9cd85c254f0505cb20f

Dry run to check what would be upgraded

deno upgrade --dry-run

Force upgrade to reinstall the current version

deno upgrade --force

Install to a custom location

deno upgrade --output /usr/local/bin/deno

Verify download with checksum

deno upgrade --checksum <sha256-hash>

Environment Variables

DENO_NO_UPDATE_CHECK
boolean
Disable automatic update checks when set to any value.
DENO_INSTALL_ROOT
string
Override the default installation directory.

Notes

  • The upgrade command caches downloaded binaries to avoid re-downloading the same version
  • On Windows, running Deno LSP processes will be terminated before upgrading
  • If upgrading fails due to permissions, you may need to run with elevated privileges
  • Downloaded versions are verified before installation
  • For canary builds, old cached versions are automatically pruned (keeps last 10)

Build docs developers (and LLMs) love