# Delete data from elastic search

**URL:** <https://discuss.elastic.co/t/delete-data-from-elastic-search/90485>\
**Category:** Elasticsearch\
**Created:** [June 22, 2017, 3:10pm UTC](https://discuss.elastic.co/t/delete-data-from-elastic-search/90485 "2017-06-22T15:10:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leela\_Kodali](https://avatars.discourse-cdn.com/v4/letter/l/ed655f/32.png) [@Leela\_Kodali](https://discuss.elastic.co/u/Leela_Kodali)\
**Post date:** [June 22, 2017, 3:10pm UTC](https://discuss.elastic.co/t/delete-data-from-elastic-search/90485/1 "2017-06-22T15:10:08Z")

</div>

Hi,  
We are planning to use ELK to capture application logs, i have a question can i delete data in elastic search after 4 months, If possible can you please suggest how to delete data in Elastic search?

Thanks,  
veni

---

<div class="post-metadata">

**Author:** ![promiseofcake](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/promiseofcake/32/18365_2.png) [@promiseofcake](https://discuss.elastic.co/u/promiseofcake)\
**Post date:** [June 22, 2017, 4:08pm UTC](https://discuss.elastic.co/t/delete-data-from-elastic-search/90485/2 "2017-06-22T16:08:52Z")

</div>

Depending on how you structure your data, let's say you have indexes created / segmented by date, it would be fairly easy to drop those indexes periodically.

This might be the most relevant to your use case:

> **[And the big one said "Rollover" — Managing Elasticsearch time-based indices...](https://www.elastic.co/blog/managing-time-based-indices-efficiently)**
>
> Introducing the new Rollover Pattern, and the APIs which support it, which is a simpler, more efficient way of managing time-based indices in Elasticsearch.

Other resources:  
[https://www.elastic.co/guide/en/elasticsearch/guide/current/retiring-data.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/retiring-data.html)  
[https://www.elastic.co/guide/en/elasticsearch/guide/current/index-aliases.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/index-aliases.html)

---

<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 20, 2017, 4:08pm UTC](https://discuss.elastic.co/t/delete-data-from-elastic-search/90485/3 "2017-07-20T16:08:57Z")

</div>

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