# Delete data older than 7 days (Ubuntu 18.04)

**URL:** <https://discuss.elastic.co/t/delete-data-older-than-7-days-ubuntu-18-04/130716>\
**Category:** Elasticsearch\
**Created:** [May 5, 2018, 8:32pm UTC](https://discuss.elastic.co/t/delete-data-older-than-7-days-ubuntu-18-04/130716 "2018-05-05T20:32:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sindred](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@sindred](https://discuss.elastic.co/u/sindred)\
**Post date:** [May 5, 2018, 8:32pm UTC](https://discuss.elastic.co/t/delete-data-older-than-7-days-ubuntu-18-04/130716/1 "2018-05-05T20:32:54Z")

</div>

When trying to delete data older than 7 days I get this error:

```
curator delete indices --older-than 7 --time-unit days --timestring %Y.%m.%d
Error: no such option: --older-than
```

---

<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 5, 2018, 10:14pm UTC](https://discuss.elastic.co/t/delete-data-older-than-7-days-ubuntu-18-04/130716/2 "2018-05-05T22:14:32Z")

</div>

You must be following some very old, outdated instructions for using Curator, which hasn't used the `--older-than` command-line flag for over two years now. It was last used in v3, which is deprecated. Curator is currently on version 5.5.1, at the time this is posted.

Please see the [official Curator documentation](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/index.html) for proper installation and use.

---

<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:** [June 2, 2018, 10:14pm UTC](https://discuss.elastic.co/t/delete-data-older-than-7-days-ubuntu-18-04/130716/3 "2018-06-02T22:14:46Z")

</div>

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