> ## 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 name.

## Signature

```python theme={null}
VastAI.delete_deployment(id: Optional[int] = None, name: Optional[str] = None, tag: Optional[str] = None) -> str
```

## Parameters

<ParamField path="id" type="Optional[int]">
  ID of the deployment to delete.
</ParamField>

<ParamField path="name" type="Optional[str]">
  Name of the deployment to delete (deletes all tags unless `--tag` is specified).
</ParamField>

<ParamField path="tag" type="Optional[str]">
  Tag to filter by when deleting by name.
</ParamField>

## Returns

`str`, Result from the API call.

## Example

```python theme={null}
from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.delete_deployment()
print(result)
```
