# Delete data in index without deleting the data

**URL:** <https://discuss.elastic.co/t/delete-data-in-index-without-deleting-the-data/245116>\
**Category:** Elasticsearch\
**Created:** [August 16, 2020, 4:46am UTC](https://discuss.elastic.co/t/delete-data-in-index-without-deleting-the-data/245116 "2020-08-16T04:46:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikramaddagulla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikramaddagulla/32/139858_2.png) [@vikramaddagulla](https://discuss.elastic.co/u/vikramaddagulla)\
**Post date:** [August 16, 2020, 4:46am UTC](https://discuss.elastic.co/t/delete-data-in-index-without-deleting-the-data/245116/1 "2020-08-16T04:46:57Z")

</div>

Hello,

Could you please share me steps on how to delete the index data without deleting the index itself ??

If yes, then is it possible to delete the data based on timeline ?

For ex : Currently I have data from the last few months in the index.  
I want to configure in such a way that at any given point of time, I would like to have data of the last one month in the index.  
Any data older than one month can be permanently deleted.

Any suggestions on this would be helpful ?

---

<div class="post-metadata">

**Author:** ![dominique.bejean](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dominique.bejean](https://discuss.elastic.co/u/dominique.bejean)\
**Post date:** [August 17, 2020, 8:35am UTC](https://discuss.elastic.co/t/delete-data-in-index-without-deleting-the-data/245116/2 "2020-08-17T08:35:34Z")

</div>

Hi,

You should take a look at ILM documentation in general and more specifically to Rollover feature.  
[https://www.elastic.co/guide/en/elasticsearch/reference/7.8/ilm-rollover.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/ilm-rollover.html)

Regards.

Dominique

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 17, 2020, 9:20am UTC](https://discuss.elastic.co/t/delete-data-in-index-without-deleting-the-data/245116/3 "2020-08-17T09:20:09Z")

</div>

++ to ILM.  
You are better off changing your indexing structure than going down this path.

---

<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:** [September 14, 2020, 9:20am UTC](https://discuss.elastic.co/t/delete-data-in-index-without-deleting-the-data/245116/4 "2020-09-14T09:20:19Z")

</div>

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