# How to remove old indices and old logs after specific duration?

**URL:** <https://discuss.elastic.co/t/how-to-remove-old-indices-and-old-logs-after-specific-duration/79220>\
**Category:** Elasticsearch\
**Created:** [March 20, 2017, 9:05am UTC](https://discuss.elastic.co/t/how-to-remove-old-indices-and-old-logs-after-specific-duration/79220 "2017-03-20T09:05:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharath\_Vutpala](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Sharath\_Vutpala](https://discuss.elastic.co/u/Sharath_Vutpala)\
**Post date:** [March 20, 2017, 9:05am UTC](https://discuss.elastic.co/t/how-to-remove-old-indices-and-old-logs-after-specific-duration/79220/1 "2017-03-20T09:05:53Z")

</div>

Hi,

In my current setup, logs are being generated at 10 GB/day from different applications. Log cycle is `Filebeat-> Logstash->Elasticsearch->Kibana`.

After doing research, i found that we can delete the old indices using `elasticsearch-curator`. I am following this documentation.  
[https://www.elastic.co/guide/en/elasticsearch/client/curator/current/delete\_indices.html](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/delete_indices.html).

I can able to to delete the indices which are older than the specified time with the help of this example Action File  
[https://www.elastic.co/guide/en/elasticsearch/client/curator/current/ex\_delete\_indices.html](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/ex_delete_indices.html).

Here are my questions.

1. Does deleting the indix deletes the logs indexed also?
2. Does deleting frees the disk-space consumed by the logs?

---

<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:** [March 20, 2017, 9:21am UTC](https://discuss.elastic.co/t/how-to-remove-old-indices-and-old-logs-after-specific-duration/79220/2 "2017-03-20T09:21:23Z")

</div>

1. Yes.
2. Yes.

---

<div class="post-metadata">

**Author:** ![Sharath\_Vutpala](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Sharath\_Vutpala](https://discuss.elastic.co/u/Sharath_Vutpala)\
**Post date:** [March 20, 2017, 9:24am UTC](https://discuss.elastic.co/t/how-to-remove-old-indices-and-old-logs-after-specific-duration/79220/3 "2017-03-20T09:24:44Z")

</div>

Thanks @warkolm.

---

<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:** [April 17, 2017, 9:24am UTC](https://discuss.elastic.co/t/how-to-remove-old-indices-and-old-logs-after-specific-duration/79220/4 "2017-04-17T09:24:58Z")

</div>

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