> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-docs-baseline.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai update

Update the CLI to the latest version

## Usage

```bash theme={null}
vastai update [--check | --version VERSION]
```

## Options

<ParamField path="--check" type="boolean">
  only check for a newer version; exit 0 if current, 10 if an update is available
</ParamField>

<ParamField path="--version" type="string">
  install a specific version instead of the latest (also how you pin or roll back)
</ParamField>

## Description

Updates a CLI installed with the managed installer
(curl -fsSL [https://vast.ai/install.sh](https://vast.ai/install.sh) | bash). The new version is
installed into a fresh environment and verified before it is swapped
in, so an interrupted update never leaves a broken CLI. To roll back a
bad release, pin the previous one: vastai update --version 1.2.3
For pip installs, update with: pip install --upgrade vastai

## Global Options

The following options are available for all commands:

| Option          | Description                                           |
| --------------- | ----------------------------------------------------- |
| `--url URL`     | Server REST API URL                                   |
| `--retry N`     | Retry limit                                           |
| `--raw`         | Output machine-readable JSON                          |
| `--explain`     | Verbose explanation of API calls                      |
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |
