# How can we automatically delete elastic search data logs

**URL:** <https://discuss.elastic.co/t/how-can-we-automatically-delete-elastic-search-data-logs/230085>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [April 28, 2020, 6:38am UTC](https://discuss.elastic.co/t/how-can-we-automatically-delete-elastic-search-data-logs/230085 "2020-04-28T06:38:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![opensourcengineer](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@opensourcengineer](https://discuss.elastic.co/u/opensourcengineer)\
**Post date:** [April 28, 2020, 6:38am UTC](https://discuss.elastic.co/t/how-can-we-automatically-delete-elastic-search-data-logs/230085/1 "2020-04-28T06:38:47Z")

</div>

i am using version 7.5.2 and the workflow is beats-\>logstash-\>elastic-search-\>kibana.

my elastic-search nodes are getting filled with the logs.

I can delete the indices automatically using the "delete" phase of lifecycle but wat about the logs which are taking up space in my ES nodes.

---

<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:** [April 28, 2020, 8:02am UTC](https://discuss.elastic.co/t/how-can-we-automatically-delete-elastic-search-data-logs/230085/2 "2020-04-28T08:02:00Z")

</div>

This doesn't exist at the moment, you may want to follow [https://github.com/elastic/elasticsearch/issues/49392](https://github.com/elastic/elasticsearch/issues/49392)

---

<div class="post-metadata">

**Author:** ![opensourcengineer](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@opensourcengineer](https://discuss.elastic.co/u/opensourcengineer)\
**Post date:** [April 29, 2020, 10:24am UTC](https://discuss.elastic.co/t/how-can-we-automatically-delete-elastic-search-data-logs/230085/4 "2020-04-29T10:24:06Z")

</div>

so eventually, when you delete an index using the delete phase based on the roll size, the data inside the index will not be deleted.

---

<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:** [April 29, 2020, 10:26am UTC](https://discuss.elastic.co/t/how-can-we-automatically-delete-elastic-search-data-logs/230085/5 "2020-04-29T10:26:11Z")

</div>

Sorry, I totally misunderstood you somehow. I thought you were asking how to delete based on how much space you have on the node.

Yes, if you delete an index it deletes the data it holds.

---

<div class="post-metadata">

**Author:** ![opensourcengineer](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@opensourcengineer](https://discuss.elastic.co/u/opensourcengineer)\
**Post date:** [April 29, 2020, 7:21pm UTC](https://discuss.elastic.co/t/how-can-we-automatically-delete-elastic-search-data-logs/230085/6 "2020-04-29T19:21:34Z")

</div>

awesome. that helps me in managing the disk space on my ES node.

---

<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:** [May 27, 2020, 7:21pm UTC](https://discuss.elastic.co/t/how-can-we-automatically-delete-elastic-search-data-logs/230085/7 "2020-05-27T19:21:34Z")

</div>

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