Upgrade tdx to the latest version. Detects your package manager (npm, bun, pnpm, or yarn) and runs the appropriate install command, targeting the same location as the running tdx.
tdx upgrade [version] [options]| Argument | Description |
|---|---|
[version] | Target version to install (e.g., 0.28.0 or v0.28.0). Defaults to latest. |
| Option | Description |
|---|---|
--dry-run | Check for updates without installing |
--next | Upgrade to the next (pre-release) channel |
--method <pm> | Package manager to use (npm, bun, pnpm, yarn) |
# Upgrade to latest stable version
tdx upgrade
# Upgrade to a specific version
tdx upgrade 0.28.0
# Check what would happen without installing
tdx upgrade --dry-run
# Upgrade to the pre-release channel
tdx upgrade --next
# Override the detected package manager
tdx upgrade --method pnpm
# Combine version and method
tdx upgrade 0.28.0 --method bun- Checks the npm registry for the latest version
- Compares with the currently installed version
- If an update is available, runs the install command into the location of the running
tdx(see Install Location) - For npm with an exact version, checks that the installed package reports it
- Reports success or failure
When a specific [version] is provided, the registry check and version comparison are skipped — the command installs the requested version directly.
When using --dry-run, the command shows the version comparison and the install command that would be executed, without actually running it.
The command automatically detects whether tdx was installed via npm, bun, pnpm, or yarn and uses the corresponding package manager for the upgrade. Use --method to override auto-detection.
tdx upgrade installs into the same npm prefix or pnpm global directory as the running tdx. For example, a tdx installed with npm install -g --prefix ~/.local upgrades in ~/.local. --dry-run shows the location.
"Upgrade did not replace the running tdx" (npm): the install finished, but the location still has the old version. Run tdx upgrade --dry-run to see the location, then install into it directly:
npm install -g --prefix <location> @treasuredata/tdx@<version>For pnpm, use pnpm add -g --global-dir <location> @treasuredata/tdx@<version>.
- Not available for development versions (local builds from source)
- The
--nextflag overrides the release channel configured in~/.config/tdx/tdx.json - Leading
vprefix is stripped from version arguments (v0.28.0→0.28.0)