# Clean up Indices? ..... free some storage

**URL:** https://discuss.elastic.co/t/clean-up-indices-free-some-storage/318925
**Category:** Elasticsearch
**Created:** [November 15, 2022, 6:51am UTC](https://discuss.elastic.co/t/clean-up-indices-free-some-storage/318925 "2022-11-15T06:51:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![theacodes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theacodes/32/113779_2.png) [@theacodes](https://discuss.elastic.co/u/theacodes)
#### Post date: [November 15, 2022, 6:51am UTC](https://discuss.elastic.co/t/clean-up-indices-free-some-storage/318925/1 "2022-11-15T06:51:33Z")

</div>

storage utilised over 90% and until now I haven't cleaned up any indices.  
What would be the perfect way to clean up indices or delete some old index data ?  
I've searched a lot but there's too much confusion over the internet.  
any method either using UI or using devtools would work  
thanks

---

<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: [November 15, 2022, 7:09am UTC](https://discuss.elastic.co/t/clean-up-indices-free-some-storage/318925/2 "2022-11-15T07:09:14Z")

</div>

The best long term option is to use [ILM](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html).

For specific indices see [Delete index API | Elasticsearch Guide [8.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.5/indices-delete-index.html)

---

<div class="post-metadata">

### Author: ![theacodes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theacodes/32/113779_2.png) [@theacodes](https://discuss.elastic.co/u/theacodes)
#### Post date: [November 15, 2022, 7:21am UTC](https://discuss.elastic.co/t/clean-up-indices-free-some-storage/318925/3 "2022-11-15T07:21:41Z")

</div>

hey there mark,  
I was expecting a quick reply from you only like yesterday lol.  
Setting ILM would be a great choice for the long term, I'm working on it but for an urgent basis another method you said would be Delete index API  
So if I run  
**GET /\_cat/indices/\*?v&s=pri.store.size:desc**  
this command to know which index is storing more data  
and then I run  
**DELETE /.ds-logs-endpoint.events.file-default-2022.10.17-000008?pretty**  
that should clean up storage on the server according to you right??  
any affects on the stack by doing this??

---

<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: [November 15, 2022, 7:31am UTC](https://discuss.elastic.co/t/clean-up-indices-free-some-storage/318925/4 "2022-11-15T07:31:54Z")

</div>

If you are using Endpoint then it should be cleaning up for you and it might be better to amend the existing ILM policy to remove data a bit sooner.

Otherwise I would delete older indices first to make sure your dashboards don't show gaps.

---

<div class="post-metadata">

### Author: ![theacodes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theacodes/32/113779_2.png) [@theacodes](https://discuss.elastic.co/u/theacodes)
#### Post date: [November 15, 2022, 8:06am UTC](https://discuss.elastic.co/t/clean-up-indices-free-some-storage/318925/5 "2022-11-15T08:06:14Z")

</div>

> If you are using Endpoint then it should be cleaning up for you

Can you please explain this? @warkolm

> Otherwise I would delete older indices first to make sure your dashboards don't show gaps.

Sure thing Mark.

---

<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: [December 13, 2022, 8:06am UTC](https://discuss.elastic.co/t/clean-up-indices-free-some-storage/318925/6 "2022-12-13T08:06:39Z")

</div>

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