> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai update workers

Trigger a rolling update of all workers in a workergroup, or cancel an in-progress update

## Usage

```bash theme={null}
vastai update workers WORKERGROUP_ID [--cancel]
```

## Arguments

<ParamField path="id" type="integer" required>
  id of workergroup to update workers for
</ParamField>

## Options

<ParamField path="--cancel" type="boolean">
  cancel an in-progress update for the workergroup
</ParamField>

## Description

Starts a rolling update of all workers in the specified workergroup. The autoscaler
will cycle through workers, updating them while maintaining capacity.

Use `--cancel` to cancel an update that is currently in progress.

## Examples

```bash theme={null}
vastai update workers 4242
vastai update workers 4242 --cancel
```

## 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`) |
