# Deleting index to clear up storage

**URL:** <https://discuss.elastic.co/t/deleting-index-to-clear-up-storage/50325>\
**Category:** Elasticsearch\
**Created:** [May 18, 2016, 9:55am UTC](https://discuss.elastic.co/t/deleting-index-to-clear-up-storage/50325 "2016-05-18T09:55:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brayndasilva](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@brayndasilva](https://discuss.elastic.co/u/brayndasilva)\
**Post date:** [May 18, 2016, 9:55am UTC](https://discuss.elastic.co/t/deleting-index-to-clear-up-storage/50325/1 "2016-05-18T09:55:16Z")

</div>

I have an index called "logstash-events" which holds a few million log entries that are sent from network devices across the network, but a majority of them(90.45%) are useless.

I filtered those out for the future, but I still have 90GB of used data which is very useless and makes things slow. How can I clear this up?

Would I have to delete the index? I'm okay with that, we're still in an early stage and won't lose anything important but notices.

---

<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:** [May 18, 2016, 10:26am UTC](https://discuss.elastic.co/t/deleting-index-to-clear-up-storage/50325/2 "2016-05-18T10:26:35Z")

</div>

You shouldn't be using a single index for this sort of data, use time based ones and then split them out by different type/sources.

For what you want to do you need to use the delete-by-query plugin - [https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugins-delete-by-query.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugins-delete-by-query.html)

---

<div class="post-metadata">

**Author:** ![brayndasilva](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@brayndasilva](https://discuss.elastic.co/u/brayndasilva)\
**Post date:** [May 18, 2016, 10:55am UTC](https://discuss.elastic.co/t/deleting-index-to-clear-up-storage/50325/3 "2016-05-18T10:55:35Z")

</div>

Alright thanks, got it.

Also changed my config up so indexes are made dynamically everyday so it's easier to manage old documents and delete them if necessary.

```
index => "logstash_events-%{+YYYY.MM.dd}"
```

---

<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:** [July 5, 2017, 10:50pm UTC](https://discuss.elastic.co/t/deleting-index-to-clear-up-storage/50325/4 "2017-07-05T22:50:43Z")

</div>


