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

# Delete Image

> Deletes an image, its versions, its context and every application created from it.

> [!WARNING]
>
> Deleting an image **also deletes every application created from it**. Each app follows the usual rules for deleting an application, including the safety snapshot on plans that have it.

Needs the `images:delete` scope when called with an API key; `images:write` does not cover it. When the image has applications, the key also needs the `apps:delete` scope, because they are deleted too. Without it the call fails with `API_KEY_SCOPE_DENIED` and `details.required` set to `apps:delete`. Deleting is refused while a build is running, and it is allowed on plans that can no longer create images.

**image\_id** `string` *required*

The image ID.

**workspace\_id** `string`

If the image belongs to a workspace, the workspace's ID. Required for workspace members acting on an image they don't own.

**confirm\_name** `string` *required*

Must be equal to the image name.

### Response

**response** `object`

**Toggle object**

**deleted\_apps** `string[]`

The IDs of the applications deleted together with the image.

```json Response theme={null}
{
  "response": {
    "deleted_apps": ["app-abc123def456"]
  }
}
```

### Error Responses

**code** `string`

The error code indicating the reason for the failure. Possible values:

* `API_KEY_SCOPE_DENIED`: The API key does not have the `images:delete` scope, or the image has applications and the key does not have the `apps:delete` scope. `details.required` names the missing scope (`403`).
* `IMAGE_NOT_FOUND`: The image does not exist or you cannot access it (`404`).
* `IMAGE_NAME_MISMATCH`: `confirm_name` is not the image name (`400`).
* `IMAGE_BUILD_IN_PROGRESS`: A build is running; wait for it to end (`409`).
* `INTERNAL_SERVER_ERROR`: Unexpected failure (`500`).

```json Error Response theme={null}
{
  "code": "IMAGE_NAME_MISMATCH"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.