# How to avoid deleting .kibana using curator

**URL:** <https://discuss.elastic.co/t/how-to-avoid-deleting-kibana-using-curator/78058>\
**Category:** Elasticsearch\
**Created:** [March 9, 2017, 10:09pm UTC](https://discuss.elastic.co/t/how-to-avoid-deleting-kibana-using-curator/78058 "2017-03-09T22:09:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ximeng\_Zhao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ximeng_zhao/32/15775_2.png) [@Ximeng\_Zhao](https://discuss.elastic.co/u/Ximeng_Zhao)\
**Post date:** [March 9, 2017, 10:09pm UTC](https://discuss.elastic.co/t/how-to-avoid-deleting-kibana-using-curator/78058/1 "2017-03-09T22:09:13Z")

</div>

Hi All,

I want to delete all my indices order than 5 days except .kibana, I think the following script is still deleting .kibana, Is there anyone can help me modify this? Thanks.

```auto
actions:
  1:
    action: delete_indices
    description: "Delete indices older than 5 days (based on index name)
                  Ignore the error if the filter does not result in an actionable list of indices (ignore_empty_list) and exit cleanly"
    options:
      timeout_override: 
      continue_if_exception: False
      disable_action: False
    filters:
    - filtertype: age
      source: creation_date
      direction: older
      unit: days
      unit_count: 5 
      exclude: 
    - filtertype: kibana
      exclude: False

```

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [March 10, 2017, 5:12am UTC](https://discuss.elastic.co/t/how-to-avoid-deleting-kibana-using-curator/78058/2 "2017-03-10T05:12:27Z")

</div>

> **[kibana | Curator Reference \[4.0\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/curator/4.0/filtertype_kibana.html)**

> [@Ximeng\_Zhao](#):
>
> - filtertype: kibana  
> exclude: False

Should be `exclude: True`. You can do a dry run to test before actually deleting indexes.

---

<div class="post-metadata">

**Author:** ![Ximeng\_Zhao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ximeng_zhao/32/15775_2.png) [@Ximeng\_Zhao](https://discuss.elastic.co/u/Ximeng_Zhao)\
**Post date:** [March 10, 2017, 1:11pm UTC](https://discuss.elastic.co/t/how-to-avoid-deleting-kibana-using-curator/78058/3 "2017-03-10T13:11:48Z")

</div>

Thanks, it works.

---

<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:** [April 7, 2017, 1:12pm UTC](https://discuss.elastic.co/t/how-to-avoid-deleting-kibana-using-curator/78058/4 "2017-04-07T13:12:23Z")

</div>

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