# Best method to free up disk

**URL:** <https://discuss.elastic.co/t/best-method-to-free-up-disk/226169>\
**Category:** Elasticsearch\
**Created:** [April 2, 2020, 7:44am UTC](https://discuss.elastic.co/t/best-method-to-free-up-disk/226169 "2020-04-02T07:44:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [April 2, 2020, 7:44am UTC](https://discuss.elastic.co/t/best-method-to-free-up-disk/226169/1 "2020-04-02T07:44:33Z")

</div>

Hello,  
I have 1 index per day.  
I would like to delete all data that is more than a month old for reasons of disk space.  
What is the best method for this:

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 2, 2020, 8:17am UTC](https://discuss.elastic.co/t/best-method-to-free-up-disk/226169/2 "2020-04-02T08:17:14Z")

</div>

You can use date patterns in the index name.

Read [https://www.elastic.co/guide/en/elasticsearch/reference/current/date-math-index-names.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/date-math-index-names.html)

---

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [April 2, 2020, 8:32am UTC](https://discuss.elastic.co/t/best-method-to-free-up-disk/226169/3 "2020-04-02T08:32:59Z")

</div>

It is possible to use any config with filebeat ?? because i use file beat from ingestion in elastic

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 2, 2020, 1:12pm UTC](https://discuss.elastic.co/t/best-method-to-free-up-disk/226169/4 "2020-04-02T13:12:00Z")

</div>

Is it related? I don't understand this last question.

---

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [April 2, 2020, 1:22pm UTC](https://discuss.elastic.co/t/best-method-to-free-up-disk/226169/5 "2020-04-02T13:22:34Z")

</div>

I would like to delete all data that is more than a month old automatic using some config for filebeat

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 2, 2020, 1:41pm UTC](https://discuss.elastic.co/t/best-method-to-free-up-disk/226169/6 "2020-04-02T13:41:14Z")

</div>

filebeat does not support that but elasticsearch has the [Index Lifecycle Management feature](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.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:** [April 30, 2020, 1:41pm UTC](https://discuss.elastic.co/t/best-method-to-free-up-disk/226169/7 "2020-04-30T13:41:17Z")

</div>

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