---
type: api
title: Remove policies from an index
description: Remove the assigned lifecycle policies from an index or a data stream's backing indices.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-ilm-remove-policy
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-ilm-remove-policy
products:
  - Elasticsearch
---

# Remove policies from an index

Availability: 6.6+

## Paths

- `POST` `/{index}/_ilm/remove`

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

#### Path Parameters

- `index` (string IndexName)
  The name of the index to remove policy on

## Description

Remove the assigned lifecycle policies from an index or a data stream's backing indices.
It also stops managing the indices.

## Required authorization

* Index privileges: `manage_ilm`

## Response

`application/json`

- `failed_indexes` ([] string IndexName)
- `has_failures` (boolean)
## Code Examples

#### Console

```console
POST logs-my_app-default/_ilm/remove
```

#### JavaScript

```javascript
const response = await client.ilm.removePolicy({
  index: "logs-my_app-default",
});
```

#### Python

```python
resp = client.ilm.remove_policy(
    index="logs-my_app-default",
)
```

#### curl

```curl
curl -X POST "$ELASTICSEARCH_URL/logs-my_app-default/_ilm/remove" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.ilm().removePolicy(r -> r
    .index("logs-my_app-default")
);
```

#### C#

```c#
var response = await client.IndexLifecycleManagement.RemovePolicyAsync(index: "logs-my_app-default");
```

#### PHP

```php
$resp = $client->ilm()->removePolicy([
    "index" => "logs-my_app-default",
]);
```

#### Ruby

```ruby
response = client.ilm.remove_policy(
  index: "logs-my_app-default"
)
```

## Response Examples

#### Remove policy response example1

A successful response when removing a lifecycle policy from an index.

```json
{
  "has_failures" : false,
  "failed_indexes" : []
}
```

