# Elasticsearch-curator - Deleting indices which are older than an hour

**URL:** https://discuss.elastic.co/t/elasticsearch-curator-deleting-indices-which-are-older-than-an-hour/48163
**Category:** Elasticsearch
**Created:** [April 22, 2016, 10:58am UTC](https://discuss.elastic.co/t/elasticsearch-curator-deleting-indices-which-are-older-than-an-hour/48163 "2016-04-22T10:58:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Deb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deb/32/46162_2.png) [@Deb](https://discuss.elastic.co/u/Deb)
#### Post date: [April 22, 2016, 10:58am UTC](https://discuss.elastic.co/t/elasticsearch-curator-deleting-indices-which-are-older-than-an-hour/48163/1 "2016-04-22T10:58:58Z")

</div>

I am having some indices in elasticsearch whose naming format is `elk-console-YYYY-MM-DDtHH`. For example:-

```
elk-console-2016-03-30t14
elk-console-2016-03-30t16

```

I want to delete all indices which are more than 1 hour old using curator. So I tried executing the below command:-

`curator --host localhost delete indices --older-than 1 --time-unit hours --timestring '%Y-%m-%dt%H'`

But it is giving me the following ouput:-

```
2016-04-22 16:27:36,049 INFO Job starting: delete indices
2016-04-22 16:27:36,058 INFO Pruning Kibana-related indices to prevent accidental deletion.
2016-04-22 16:27:36,058 WARNING No indices matched provided args: {'regex': None, 'index': (), 'suffix': None, 'newer_than': None, 'closed_only': False, 'prefix': None, 'time_unit': 'hours', 'timestring': u'%Y-%m-%dt%H', 'exclude': (), 'older_than': 1, 'all_indices': False}
No indices matched provided args: {'regex': None, 'index': (), 'suffix': None, 'newer_than': None, 'closed_only': False, 'prefix': None, 'time_unit': 'hours', 'timestring': u'%Y-%m-%dt%H', 'exclude': (), 'older_than': 1, 'all_indices': False}

```

Can some one please help me what `timestring` format should I use in my case?

---

<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 13, 2016, 7:29pm UTC](https://discuss.elastic.co/t/elasticsearch-curator-deleting-indices-which-are-older-than-an-hour/48163/2 "2016-05-13T19:29:18Z")

</div>

To close this out: [https://github.com/elastic/curator/pull/603](https://github.com/elastic/curator/pull/603) fixed the issue.

---

<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, 10:51pm UTC](https://discuss.elastic.co/t/elasticsearch-curator-deleting-indices-which-are-older-than-an-hour/48163/3 "2017-07-05T22:51:31Z")

</div>


