---
type: api
title: Delete snapshot repository
description: Deletes the snapshot repository configuration.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-delete-snapshot-repository
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-delete-snapshot-repository
products:
  - Elastic Cloud Enterprise
---

# Delete snapshot repository

## Paths

- `DELETE` `/platform/configuration/snapshots/repositories/{repository_name}`

- [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

- `repository_name` (string)
  The name of the snapshot repository configuration.

## Description

Deletes the snapshot repository configuration.

## Query String Parameters

- `cleanup_deployments` (boolean · default: false)
  Removes references to this snapshot repository configuration and disables snapshots on the clusters that were referencing this configuration. If a request is made to delete a repository configuration that has already been deleted and this parameter is set to true and clusters still reference the configuration, then the request will have the side effects of removing references and disabling snapshots for clusters that reference the previously deleted configuration.

## Responses

#### `200`

successful operation

`application/octet-stream`

Type: `EmptyResponse`

#### `202`

Delete snapshot repository config

`application/octet-stream`

Type: `EmptyResponse`

#### `500`

Failed to delete references and disable snapshots in one or more referencing clusters.

`application/octet-stream`

- `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
## Code Examples

#### Console

```console
DELETE /platform/configuration/snapshots/repositories/{repository_name}
```

#### curl

```curl
curl -X DELETE "/platform/configuration/snapshots/repositories/{repository_name}"
```

