# Delete Indices Action removes also Index patterns from Kibana

**URL:** <https://discuss.elastic.co/t/delete-indices-action-removes-also-index-patterns-from-kibana/197802>\
**Category:** Elasticsearch\
**Created:** [September 3, 2019, 9:26am UTC](https://discuss.elastic.co/t/delete-indices-action-removes-also-index-patterns-from-kibana/197802 "2019-09-03T09:26:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ab\_Avramidis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ab_avramidis/32/51514_2.png) [@Ab\_Avramidis](https://discuss.elastic.co/u/Ab_Avramidis)\
**Post date:** [September 3, 2019, 9:26am UTC](https://discuss.elastic.co/t/delete-indices-action-removes-also-index-patterns-from-kibana/197802/1 "2019-09-03T09:26:37Z")

</div>

Hi,

I was wondering If anyone can explain to me why and how I can avoid that issue, when I execute through curator an action to delete my old indices, it also delete(removes) automatically the Index patterns from my Kibana dashboard.

This is the content of curator action:  
---

```
actions:
  1:
    action: delete_indices
    description: >-
      Delete indices older than 30 days
    options:
      timeout_override: 400
      continue_if_exception: False
    filters:
    - filtertype: age
       source: creation_date
       direction: older
       unit: days
       unit_count: 30

```

How I can avoid that?  
Thanks!

---

<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:** [September 4, 2019, 3:43pm UTC](https://discuss.elastic.co/t/delete-indices-action-removes-also-index-patterns-from-kibana/197802/2 "2019-09-04T15:43:42Z")

</div>

Having only `filtertype: age` using `creation_date` does not exclude any index from potential selection. If you want to exclude system indices, I recommend using a pattern filter _first:_

```auto
    filters:
    - filtertype: pattern
      kind: regex
      value: '^\.*'
      exclude: true
    - filtertype: age
      source: creation_date
      direction: older
      unit: days
      unit_count: 30

```

This will exclude any index starting with a `.`. As always, test with `--dry-run` before actually deploying.

---

<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:** [October 2, 2019, 3:43pm UTC](https://discuss.elastic.co/t/delete-indices-action-removes-also-index-patterns-from-kibana/197802/3 "2019-10-02T15:43:49Z")

</div>

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