# ELK Delete Indices

**URL:** <https://discuss.elastic.co/t/elk-delete-indices/228144>\
**Category:** Elasticsearch\
**Created:** [April 15, 2020, 2:59pm UTC](https://discuss.elastic.co/t/elk-delete-indices/228144 "2020-04-15T14:59:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anand\_Sakthivel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anand_sakthivel/32/46709_2.png) [@Anand\_Sakthivel](https://discuss.elastic.co/u/Anand_Sakthivel)\
**Post date:** [April 15, 2020, 2:59pm UTC](https://discuss.elastic.co/t/elk-delete-indices/228144/1 "2020-04-15T14:59:08Z")

</div>

Hi,

I'm new to ELK stack. Our server is running out of disk space and we have a cronjob running to delete the indices.

1 1 \* \* \* /usr/local/bin/curator /root/.curator/action\_remove\_old\_logs.yml

But what is occupying more on the disk is the data under the path,  
/storage/elasticsearch/elasticsearch/nodes/0/indices

where I see many random named folders like below

XY-6RdNjRlKCX8gHxcXAEg  
YCUyx5gNTjOzH7bmJwGy3w  
ymqMWFmXRxeUmF7sg-ADVw

So what are these and is it safe to remove these folders? Please advice.

Thank You

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 15, 2020, 3:01pm UTC](https://discuss.elastic.co/t/elk-delete-indices/228144/2 "2020-04-15T15:01:18Z")

</div>

That is the indexed data and you should NEVER delete anything directly from disk there. Instead use the APIs to delete indices you no longer need.

---

<div class="post-metadata">

**Author:** ![Anand\_Sakthivel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anand_sakthivel/32/46709_2.png) [@Anand\_Sakthivel](https://discuss.elastic.co/u/Anand_Sakthivel)\
**Post date:** [April 15, 2020, 3:11pm UTC](https://discuss.elastic.co/t/elk-delete-indices/228144/3 "2020-04-15T15:11:33Z")

</div>

Alright. So based on the output I got,

```auto
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open logstash-vshield-2020.01.18 U0-ss6OmT1-PCog7lB5ykQ 5 1 14476719 0 2.8gb 2.8gb

```

The API to delete the index would be,

```auto
curl -XDELETE 'localhost:9200/logstash-vshield-2020.01.18'

```

So it is safe to run this command ?

Thank You

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 15, 2020, 3:29pm UTC](https://discuss.elastic.co/t/elk-delete-indices/228144/4 "2020-04-15T15:29:38Z")

</div>

If you are looking to delete that index the command looks fine.

---

<div class="post-metadata">

**Author:** ![Anand\_Sakthivel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anand_sakthivel/32/46709_2.png) [@Anand\_Sakthivel](https://discuss.elastic.co/u/Anand_Sakthivel)\
**Post date:** [April 15, 2020, 3:42pm UTC](https://discuss.elastic.co/t/elk-delete-indices/228144/5 "2020-04-15T15:42:12Z")

</div>

> [@Anand\_Sakthivel](#):
>
> curl -XDELETE 'localhost:9200/logstash-vshield-2020.01.18'

Thank You for your quick responses.

---

<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 13, 2020, 3:42pm UTC](https://discuss.elastic.co/t/elk-delete-indices/228144/6 "2020-05-13T15:42:19Z")

</div>

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