---
type: api
title: Delete a dangling index
description: If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/elasticsearch/v8/operation/operation-dangling-indices-delete-dangling-index
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/elasticsearch/v8/operation/operation-dangling-indices-delete-dangling-index
products:
  - Elasticsearch
---

# Delete a dangling index

Authentication: required

Availability: Generally available since 7.9

## Paths

- `DELETE` `/_dangling/{index_uuid}`

#### Path parameters

- `index_uuid` (string) — required
  The UUID of the index to delete. Use the get dangling indices API to find the UUID.

## Description

If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
For example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.

## Required authorization

- Cluster privileges: `manage`

## Query string parameters

- `accept_data_loss` (boolean · default: false) — optional
  This parameter must be set to true to acknowledge that it will no longer be possible to recove data from the dangling index.
- `master_timeout` (string · default: 30s) — optional
  The period to wait for a connection to the master node.
- `timeout` (string · default: 30s) — optional
  The period to wait for a response.

## Response

`application/json`

- `acknowledged` (boolean)
  For a successful response, this value is always true. On failure, an exception is returned instead.
## Code examples

#### Console

```console
DELETE /_dangling/<index-uuid>?accept_data_loss=true
```

#### JavaScript

```javascript
const response = await client.danglingIndices.deleteDanglingIndex({
  index_uuid: "<index-uuid>",
  accept_data_loss: "true",
});
```

#### Python

```python
resp = client.dangling_indices.delete_dangling_index(
    index_uuid="<index-uuid>",
    accept_data_loss=True,
)
```

#### curl

```curl
curl -X DELETE "$ELASTICSEARCH_URL/_dangling/<index-uuid>?accept_data_loss=true" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.danglingIndices().deleteDanglingIndex(d -> d
    .acceptDataLoss(true)
    .indexUuid("<index-uuid>")
);
```

#### C#

```c#
var response = await client.DanglingIndices
    .DeleteDanglingIndexAsync(indexUuid: "<index-uuid>", d1 => d1
        .AcceptDataLoss(true)
    );
```

#### PHP

```php
$resp = $client->danglingIndices()->deleteDanglingIndex([
    "index_uuid" => "<index-uuid>",
    "accept_data_loss" => "true",
]);
```

#### Ruby

```ruby
response = client.dangling_indices.delete_dangling_index(
  index_uuid: "<index-uuid>",
  accept_data_loss: "true"
)
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "acknowledged": false
}
```

