# Delete Index and How to free up disk space

**URL:** <https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354>\
**Category:** Elasticsearch\
**Created:** [September 13, 2017, 12:37pm UTC](https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354 "2017-09-13T12:37:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![swlee](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@swlee](https://discuss.elastic.co/u/swlee)\
**Post date:** [September 13, 2017, 12:37pm UTC](https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354/1 "2017-09-13T12:37:21Z")

</div>

using elastic 5.3.0

i was delete indices because "high disk watermark [90%]" warn.

but disk space did not free up yet

there is no "\_optimze" method..

how to free up?

please help

---

<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:** [September 13, 2017, 12:53pm UTC](https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354/2 "2017-09-13T12:53:08Z")

</div>

I'm surprised that removing indices does not free disk space.

What command did you run?

What gives

```
GET _cat/indices?v
```

---

<div class="post-metadata">

**Author:** ![swlee](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@swlee](https://discuss.elastic.co/u/swlee)\
**Post date:** [September 13, 2017, 12:54pm UTC](https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354/3 "2017-09-13T12:54:55Z")

</div>

GET /\_cat/indices?v&s=store.size:desc

result is...

```auto
yellow open pf.raw.20170912 9QerYLinSqa3Jw-XyTNbJA 5 1 134610464 0 118.1gb 118.1gb
yellow open pf.raw.20170913 xIEGzpbnTCCk4ZoX8LTR8Q 5 1 13990301 0 14.6gb 14.6gb
yellow open pf.raw.apm.text UwAyR9KCS2qGYMvs5fv23A 5 1 915432 12309 363.5mb 363.5mb
yellow open pf.day.20170913 o477cKFaQ9m1VIJyg2JcQQ 5 1 27466 0 52.9mb 52.9mb
yellow open pf.day.20170816 STPr_pY-SnW_4KLMydEZBA 5 1 47397 0 44.4mb 44.4mb
yellow open pf.day.20170813 ZyuidfvGQTKyvTCC3k462g 5 1 47202 0 44.3mb 44.3mb
yellow open pf.day.20170808 4IwYz60zSJSQy37OXflYAA 5 1 46840 0 44.1mb 44.1mb

```

And

```auto
GET /_cat/shards/pf.raw.20170913*
pf.raw.20170913 2 p STARTED 2943304 2.6gb 1.255.114.65 a-5
pf.raw.20170913 2 r UNASSIGNED                            
pf.raw.20170913 3 p STARTED 2943290 2.8gb 1.255.114.65 a-5
pf.raw.20170913 3 r UNASSIGNED                            
pf.raw.20170913 4 p STARTED 2943451 2.6gb 1.255.114.65 a-5
pf.raw.20170913 4 r UNASSIGNED                            
pf.raw.20170913 1 p STARTED 2943932 2.6gb 1.255.114.65 a-5
pf.raw.20170913 1 r UNASSIGNED                            
pf.raw.20170913 0 p STARTED 2942141 2.5gb 1.255.114.65 a-5
pf.raw.20170913 0 r UNASSIGNED

```

---

<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:** [September 13, 2017, 1:14pm UTC](https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354/4 "2017-09-13T13:14:32Z")

</div>

Wanna remove index from yesterday?

```auto
DELETE pf.raw.20170912

```

**Warning** IT WILL REMOVE YOUR DATA!

---

<div class="post-metadata">

**Author:** ![swlee](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@swlee](https://discuss.elastic.co/u/swlee)\
**Post date:** [September 13, 2017, 1:19pm UTC](https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354/5 "2017-09-13T13:19:30Z")

</div>

no..

i was delete older index , between 'pf.raw.20170501' ~ 'pf.raw.20170911'

there are delete successfully, and no longer can't search. but disk space not free..

---

<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:** [September 13, 2017, 1:24pm UTC](https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354/6 "2017-09-13T13:24:49Z")

</div>

How much disk space you have in total?

---

<div class="post-metadata">

**Author:** ![swlee](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@swlee](https://discuss.elastic.co/u/swlee)\
**Post date:** [September 13, 2017, 1:27pm UTC](https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354/7 "2017-09-13T13:27:41Z")

</div>

> [@dadoonet](#):
>
> How much disk space you have in total?

our disk space

1.9T/ 2.0T

Avail 53GB

---

<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:** [September 13, 2017, 1:30pm UTC](https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354/8 "2017-09-13T13:30:35Z")

</div>

The biggest index is `118.1gb` as you pasted.

You should try to check in which dir exactly all the storage has gone IMO.

Can you check what is the disk space used by elasticsearch `data` dir?

---

<div class="post-metadata">

**Author:** ![swlee](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@swlee](https://discuss.elastic.co/u/swlee)\
**Post date:** [September 13, 2017, 1:48pm UTC](https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354/9 "2017-09-13T13:48:58Z")

</div>

sorry, another directory problem...

thank you for help

---

<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:** [October 11, 2017, 1:50pm UTC](https://discuss.elastic.co/t/delete-index-and-how-to-free-up-disk-space/100354/10 "2017-10-11T13:50:03Z")

</div>

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