> ## 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 delete deployment

Delete a deployment by id, or by name and optional tag

## Usage

```bash theme={null}
vastai delete deployment [ID | --name NAME [--tag TAG]]
```

## Arguments

<ParamField path="id" type="integer" required>
  id of deployment to delete
</ParamField>

## Options

<ParamField path="--name" type="string">
  name of deployment to delete (deletes all tags unless `--tag` is specified)
</ParamField>

<ParamField path="--tag" type="string">
  tag to filter by when deleting by name
</ParamField>

## Examples

```bash theme={null}
vastai delete deployment 1234
vastai delete deployment --name my-deployment
vastai delete deployment --name my-deployment --tag prod
```

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