---
type: api
title: Delete stack version
description: Uses the `deleted` flag, which removes only that version of the Elastic Stack from the list of available versions. To restore the version, send an update request. For more information, see the PUT request.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-delete-version-stack
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-delete-version-stack
products:
  - Elastic Cloud Enterprise
---

# Delete stack version

## Paths

- `DELETE` `/stack/versions/{version}`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

#### Path Parameters

- `version` (string)
  The Elastic Stack version. For example, `5.3.1` or `5.0.0-RC4`.

## Description

Uses the `deleted` flag, which removes only that version of the Elastic Stack from the list of available versions. To restore the version, send an update request. For more information, see the PUT request.

## Responses

#### `200`

The `deleted` flag is applied to the specified Elastic Stack version.

`application/json`

Type: `EmptyResponse`

#### `404`

The Elastic Stack version can't be found. (code: `stackpack.version_not_found`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code Examples

#### Console

```console
DELETE /stack/versions/{version}
```

#### curl

```curl
curl -X DELETE "/stack/versions/{version}"
```

