# Curator don't delete indices

**URL:** <https://discuss.elastic.co/t/curator-dont-delete-indices/181335>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [May 16, 2019, 8:23am UTC](https://discuss.elastic.co/t/curator-dont-delete-indices/181335 "2019-05-16T08:23:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![colix](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colix/32/46274_2.png) [@colix](https://discuss.elastic.co/u/colix)\
**Post date:** [May 16, 2019, 8:23am UTC](https://discuss.elastic.co/t/curator-dont-delete-indices/181335/1 "2019-05-16T08:23:20Z")

</div>

Hi, I want to delete old indices in elastic. But it not working.

```
Index dem.nisr-2019.05.13 is actionable and remains in the list.
Remains in actionable list: Index "dem.nisr-2019.05.13" age (1557705600), direction: "older", point of reference, (1557819602)

Filtering indices with index.lifecycle.name
Index dem.nisr-2019.05.13 is actionable and remains in the list.
Remains in actionable list: index.lifecycle.name is not set for index dem.nisr-2019.05.14
DRY-RUN MODE. No changes will be made.
(CLOSED) indices may be shown that may not be acted on by action "close".
DRY-RUN: close: dem.nisr-2019.05.13 with arguments: {'delete_aliases': False}

```

But it's no one indices, it's more.

**My action.yml**

```
actions:
  1:
    action: close
    description: >-
      Close indices older than 2 days (based on index name).
    options:
      ignore_empty_list: True
      delete_aliases: False
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: prd.rnis-
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 2

  2:
    action: delete_indices
    description: >-
      Delete indices older than 2 days (based on index name).
    options:
      ignore_empty_list: True
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: prd.rnis-
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 2

  3:
    action: close
    description: >-
      Close indices older than 2 days (based on index name).
    options:
      ignore_empty_list: True
      delete_aliases: False
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: dem.nisr-
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 2

  4:
    action: delete_indices
    description: >-
      Delete indices older than 2 days (based on index name).
    options:
      ignore_empty_list: True
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: dem.nisr-
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 2
```

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [May 16, 2019, 5:34pm UTC](https://discuss.elastic.co/t/curator-dont-delete-indices/181335/2 "2019-05-16T17:34:16Z")

</div>

> [@colix](#):
>
> DRY-RUN MODE. No changes will be made.

I'm not sure I follow your problem. It appears you are running with the `--dry-run` flag. Nothing will be deleted or closed with this flag present. It means, "show me what you _would_ have done without actually doing it." Perhaps re-run without the flag?

---

<div class="post-metadata">

**Author:** ![colix](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colix/32/46274_2.png) [@colix](https://discuss.elastic.co/u/colix)\
**Post date:** [May 17, 2019, 12:00pm UTC](https://discuss.elastic.co/t/curator-dont-delete-indices/181335/3 "2019-05-17T12:00:21Z")

</div>

Yes, it workin. Thnx!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 14, 2019, 12:00pm UTC](https://discuss.elastic.co/t/curator-dont-delete-indices/181335/4 "2019-06-14T12:00:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
