# Curator delete indices

**URL:** <https://discuss.elastic.co/t/curator-delete-indices/38369>\
**Category:** Elasticsearch\
**Created:** [January 5, 2016, 5:49am UTC](https://discuss.elastic.co/t/curator-delete-indices/38369 "2016-01-05T05:49:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navneet\_Mathpal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navneet_mathpal/32/3677_2.png) [@Navneet\_Mathpal](https://discuss.elastic.co/u/Navneet_Mathpal)\
**Post date:** [January 5, 2016, 5:49am UTC](https://discuss.elastic.co/t/curator-delete-indices/38369/1 "2016-01-05T05:49:47Z")

</div>

Hi,

I am deleting the elasticsearch indices which are older than 30 days .  
for checking the functionality I have created some indices , for some indices it is working  
ex: data-2015.10.10

But for some indices It is not able to match the indices pattern and so not able to delete  
ex: logs-2015.1.12

> curator --host localhost --port 9200 delete indices --older-than 30 --time-unit days --timestring %Y.%m.%d

could you please let me know why the query is not running successfully for the second index ?

Thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 5, 2016, 6:43am UTC](https://discuss.elastic.co/t/curator-delete-indices/38369/2 "2016-01-05T06:43:28Z")

</div>

Isn't the index named logs-2015.01.12, i.e. with a two-digit month? If it really is named logs-2015.1.12 I can imagine that that's the problem.

Otherwise I'd try increasing the log level of Curator to better understand what's going on.

---

<div class="post-metadata">

**Author:** ![Navneet\_Mathpal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navneet_mathpal/32/3677_2.png) [@Navneet\_Mathpal](https://discuss.elastic.co/u/Navneet_Mathpal)\
**Post date:** [January 5, 2016, 8:35am UTC](https://discuss.elastic.co/t/curator-delete-indices/38369/3 "2016-01-05T08:35:02Z")

</div>

Thank you ..

Problem was with two-digit month only .. I missed that ☹

---

<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:** [July 5, 2017, 11:27pm UTC](https://discuss.elastic.co/t/curator-delete-indices/38369/4 "2017-07-05T23:27:04Z")

</div>


