---
title: "ktm variables update"
description: "Update a variable's name, description, and/or default_value (properties only)"
sidebarTitle: "update"
lastUpdated: "2026-09-23"
---

> **For AI agents:** the complete documentation index is at [llms.txt](/llms.txt). Append `.md` to any page URL for its markdown version.

{/* GENERATED FILE: do not edit by hand. Regenerate with: node scripts/generate.mjs */}

Update a variable's name, description, and/or default_value (properties only)

## Usage

```bash
ktm variables update <id> [flags]
```

## Examples

```bash
ktm variables update 17 --description "DB hostname"
ktm variables update 17 --default-value "new-default"
ktm variables update 17 --name DB_HOST_V2
```

## Arguments

| Argument | Required |
| --- | --- |
| `id` | Yes |

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--default-value` | string |  | New default value |
| `--description` | string |  | New description (optional, recommended) — overwrites the current value; useful for clarifying purpose |
| `--name` | string |  | New name |

## Details

Properties only — this command does NOT touch per-variant values. To change one
variant's value use 'ktm variables set-value'; to copy values across variants
use 'ktm variables variants copy-values'. Variable type is immutable on the
platform; this command preserves it.

## Notes

- Updates a variable's properties (name, description, default value). To set a single variant's value, use [`ktm variables set-value`](/cli/commands/variables/set-value).

## Related

- [`ktm variables`](/cli/commands/variables)
- [`ktm variables variants`](/cli/commands/variables/variants)

<Note>
  Global flags (`--output`, `--debug`, `--host`, …) apply to every command. See the [command reference overview](/cli/commands/overview).
</Note>

## What's next?

<Columns cols={2}>
  <Card title="All commands" icon="terminal" href="/cli/commands/overview">
    Browse the full CLI reference.
  </Card>
  <Card title="Get started" icon="rocket" href="/cli/getting-started">
    Install the CLI and authenticate.
  </Card>
</Columns>
