# Using curator delete index

**URL:** <https://discuss.elastic.co/t/using-curator-delete-index/119324>\
**Category:** Elasticsearch\
**Created:** [February 10, 2018, 3:32am UTC](https://discuss.elastic.co/t/using-curator-delete-index/119324 "2018-02-10T03:32:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lory\_Hou](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@Lory\_Hou](https://discuss.elastic.co/u/Lory_Hou)\
**Post date:** [February 10, 2018, 3:32am UTC](https://discuss.elastic.co/t/using-curator-delete-index/119324/1 "2018-02-10T03:32:54Z")

</div>

I am following document to delete index by using curator.  
running command like  
curator /home/ubuntu/curator/delete-index/openapi.yml --config /home/ubuntu/curator/curator-staging.yml

After command is completed with no error, but older index still exists. Any error in my yaml file?

## The delete yaml file is following

actions:  
1:  
action: delete\_indices  
description: \>-  
Delete indices older than 5 days (based on index name), for logstash-  
prefixed indices. Ignore the error if the filter does not result in an  
actionable list of indices (ignore\_empty\_list) and exit cleanly.  
options:  
ignore\_empty\_list: True  
continue\_if\_exception: False  
disable\_action: False  
filters:  
- filtertype: pattern  
kind: prefix  
value: openapi-  
- filtertype: age  
source: name  
direction: older  
timestring: '%Y.%m.%d'  
unit: days  
unit\_count: 5

---

<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:** [February 10, 2018, 7:44am UTC](https://discuss.elastic.co/t/using-curator-delete-index/119324/2 "2018-02-10T07:44:44Z")

</div>

Please edit your post and encapsulate your config lines in triple back-ticks, otherwise I cannot whether the config is inaccurate. YAML formatting is very specific.

````
```
PASTE TEXT HERE
```
````

---

<div class="post-metadata">

**Author:** ![Lory\_Hou](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@Lory\_Hou](https://discuss.elastic.co/u/Lory_Hou)\
**Post date:** [February 11, 2018, 2:30pm UTC](https://discuss.elastic.co/t/using-curator-delete-index/119324/3 "2018-02-11T14:30:39Z")

</div>

Thanks, I found this is caused by configuration file error which I didn't post here.

BTW, is any running log for curator? I could not find the log of curator.

---

<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:** [February 11, 2018, 6:46pm UTC](https://discuss.elastic.co/t/using-curator-delete-index/119324/4 "2018-02-11T18:46:30Z")

</div>

You define the log in the `~/.curator/curator.yml` file, or what you specify as the file with `--config /path/to/config.yml`, or if using `curator_cli`, you can alternatively specify `--logfile /path/to/logfile.log`

If undefined, it will log to STDOUT.

---

<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:** [March 11, 2018, 6:46pm UTC](https://discuss.elastic.co/t/using-curator-delete-index/119324/5 "2018-03-11T18:46:32Z")

</div>

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