# How long the data is being stored in Elastic

**URL:** <https://discuss.elastic.co/t/how-long-the-data-is-being-stored-in-elastic/1488>\
**Category:** Elasticsearch\
**Created:** [May 28, 2015, 3:13pm UTC](https://discuss.elastic.co/t/how-long-the-data-is-being-stored-in-elastic/1488 "2015-05-28T15:13:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaltaratuta](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@michaltaratuta](https://discuss.elastic.co/u/michaltaratuta)\
**Post date:** [May 28, 2015, 3:13pm UTC](https://discuss.elastic.co/t/how-long-the-data-is-being-stored-in-elastic/1488/1 "2015-05-28T15:13:51Z")

</div>

How long the data is being stored in Elastic?

How to purge it and control for how long is it stored?

---

<div class="post-metadata">

**Author:** ![tylerjl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylerjl/32/44965_2.png) [@tylerjl](https://discuss.elastic.co/u/tylerjl)\
**Post date:** [May 28, 2015, 5:26pm UTC](https://discuss.elastic.co/t/how-long-the-data-is-being-stored-in-elastic/1488/2 "2015-05-28T17:26:35Z")

</div>

Elasticsearch retains data until you delete it. In order to purge data from indices, doing so with [curator](https://github.com/elastic/curator) is a very good and easy way of doing so. You can use curator's [delete](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/delete.html) command to [select indices that match certain criteria](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index-selection.html), such as how much space indices use, or how old they are.

---

<div class="post-metadata">

**Author:** ![michaltaratuta](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@michaltaratuta](https://discuss.elastic.co/u/michaltaratuta)\
**Post date:** [May 29, 2015, 8:01am UTC](https://discuss.elastic.co/t/how-long-the-data-is-being-stored-in-elastic/1488/3 "2015-05-29T08:01:24Z")

</div>

Thanks tylerjl, I'm going to check the curator.

---

<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 6, 2017, 12:10am UTC](https://discuss.elastic.co/t/how-long-the-data-is-being-stored-in-elastic/1488/4 "2017-07-06T00:10:54Z")

</div>


