# Manually delete old logs/indices in ELK 7.3.0

**URL:** <https://discuss.elastic.co/t/manually-delete-old-logs-indices-in-elk-7-3-0/227981>\
**Category:** Elasticsearch\
**Created:** [April 14, 2020, 6:55pm UTC](https://discuss.elastic.co/t/manually-delete-old-logs-indices-in-elk-7-3-0/227981 "2020-04-14T18:55:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamed.samir](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@mohamed.samir](https://discuss.elastic.co/u/mohamed.samir)\
**Post date:** [April 14, 2020, 6:55pm UTC](https://discuss.elastic.co/t/manually-delete-old-logs-indices-in-elk-7-3-0/227981/1 "2020-04-14T18:55:23Z")

</div>

please, how to delete old logs/indices or in ELK 7.3

before i used to use

curl -GET [http://localhost:9200/\_cat/indices](http://localhost:9200/_cat/indices)

to see old indices and delete it manually using

curl -XDELETE [http://localhost:9200/logstash-2020.01.\*](http://localhost:9200/logstash-2020.01.*)

but now, when i use

curl -GET [http://localhost:9200/\_cat/indices](http://localhost:9200/_cat/indices)

i got a bulk of one row data (all size 120G) like this one

yellow open logstash 4KcX1ncGRgSwIL9Ow0yE\_g 1 1 113013399 0 120.6gb  
120.6gb

any idea how to delete old logs manually please, like before?

---

<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 21, 2020, 2:08pm UTC](https://discuss.elastic.co/t/manually-delete-old-logs-indices-in-elk-7-3-0/227981/2 "2020-04-21T14:08:58Z")

</div>

So you have only one index now?  
Instead of using daily indices? That's it?

If you want to remove **ALL** logs, run

```
DELETE logstash

```

It will remove the entire index.  
If you want to delete data within this index, you probably have to use delete by query API.  
But if you end up removing a lot of data, like 50% of the data, it could be better to reindex the old data in a new index instead then drop the old index as I mentioned above.

---

<div class="post-metadata">

**Author:** ![mohamed.samir](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@mohamed.samir](https://discuss.elastic.co/u/mohamed.samir)\
**Post date:** [April 21, 2020, 3:29pm UTC](https://discuss.elastic.co/t/manually-delete-old-logs-indices-in-elk-7-3-0/227981/3 "2020-04-21T15:29:04Z")

</div>

hello David,  
thanks a lot for your kind reply  
first how to reindex old data?  
or how to configure my ELK to maintain daily indices as before?  
best regards,

---

<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 21, 2020, 5:32pm UTC](https://discuss.elastic.co/t/manually-delete-old-logs-indices-in-elk-7-3-0/227981/4 "2020-04-21T17:32:12Z")

</div>

You use the reindex API.

For logstash, you probably changed the elasticsearch output default configuration. Check it.

---

<div class="post-metadata">

**Author:** ![mohamed.samir](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@mohamed.samir](https://discuss.elastic.co/u/mohamed.samir)\
**Post date:** [April 25, 2020, 10:03pm UTC](https://discuss.elastic.co/t/manually-delete-old-logs-indices-in-elk-7-3-0/227981/5 "2020-04-25T22:03:25Z")

</div>

hi dadoonet  
please, i may delete the current big log file, no problem  
but in future, how can i rotate this indices as before (every day)?  
and what do you mean of "elasticsearch output default configuration"? how can i find such settings?

---

<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 26, 2020, 6:46am UTC](https://discuss.elastic.co/t/manually-delete-old-logs-indices-in-elk-7-3-0/227981/6 "2020-04-26T06:46:12Z")

</div>

You said you have logstash.  
Share the logstash pipeline file. I believe it's named `logstash.conf` or something like that.

It's often stored in the logstash directory.  
If you still don't know where it is, tell me how do you exactly start logstash.

---

<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 24, 2020, 6:46am UTC](https://discuss.elastic.co/t/manually-delete-old-logs-indices-in-elk-7-3-0/227981/7 "2020-05-24T06:46:13Z")

</div>

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