---
type: api
title: Delete data stream lifecycles
description: Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/operation/operation-indices-delete-data-lifecycle
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/operation/operation-indices-delete-data-lifecycle
products:
  - Elasticsearch
---

# Delete data stream lifecycles

Availability: 8.11+

## Paths

- `DELETE` `/_data_stream/{name}/_lifecycle`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#bearerauth)

#### Path Parameters

- `name` (union DataStreamName | [] DataStreamName)
  A comma-separated list of data streams of which the data stream lifecycle will be deleted.
Use `*` to get all data streams

## Description

Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.

[About data stream lifecycle](https://www.elastic.co/docs/manage-data/lifecycle/data-stream)

## Query String Parameters

- `expand_wildcards` (string ExpandWildcards · default: open)
  Whether wildcard expressions should get expanded to open or closed indices (default: open)

Supported values include:
  - `all`: Match any data stream or index, including hidden ones.
  - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
  - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
  - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
  - `none`: Wildcard expressions are not accepted.
  Values: `all`, `open`, `closed`, `hidden`, `none`
- `master_timeout` (string Duration · default: 30s)
  The period to wait for a connection to the master node.
- `timeout` (string Duration · default: 30s)
  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 _data_stream/my-data-stream/_lifecycle
```

#### JavaScript

```javascript
const response = await client.indices.deleteDataLifecycle({
  name: "my-data-stream",
});
```

#### Python

```python
resp = client.indices.delete_data_lifecycle(
    name="my-data-stream",
)
```

#### curl

```curl
curl -X DELETE "$ELASTICSEARCH_URL/_data_stream/my-data-stream/_lifecycle" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.indices().deleteDataLifecycle(d -> d
    .name("my-data-stream")
);
```

#### C#

```c#
var response = await client.Indices.DeleteDataLifecycleAsync(name: new[] { "my-data-stream" });
```

#### PHP

```php
$resp = $client->indices()->deleteDataLifecycle([
    "name" => "my-data-stream",
]);
```

#### Ruby

```ruby
response = client.indices.delete_data_lifecycle(
  name: "my-data-stream"
)
```

## Response Examples

#### Indices delete data lifecycle response example1

A successful response for deleting a data stream lifecycle.

```json
{
  "acknowledged": true
}
```

