# \[Elasticsearch\] Delete logs

**URL:** <https://discuss.elastic.co/t/elasticsearch-delete-logs/204631>\
**Category:** Elasticsearch\
**Created:** [October 22, 2019, 10:47am UTC](https://discuss.elastic.co/t/elasticsearch-delete-logs/204631 "2019-10-22T10:47:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thebeaoliveira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thebeaoliveira/32/53314_2.png) [@thebeaoliveira](https://discuss.elastic.co/u/thebeaoliveira)\
**Post date:** [October 22, 2019, 10:47am UTC](https://discuss.elastic.co/t/elasticsearch-delete-logs/204631/1 "2019-10-22T10:47:16Z")

</div>

Hello!

I would like to know if I can delete the logs below as I am trying to optimize disk space.

files location: cd /var/log/elasricsearch

elastic\_audit.json  
elastic-deprecation-1.json  
elastic-deprecation.json  
elastic\_deprecation.log  
elastic-index\_indexing\_slowlog.json  
elastic-index\_indexing\_slowlog.log  
elastic-index\_search\_slowlog.json  
elastic-index\_search\_slowlog.log  
elastic-prod.log  
elastic-prod\_server.json

If I delete, will I have any side effects?

Or can I erase without problems?

---

<div class="post-metadata">

**Author:** ![sandeepkanabar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeepkanabar/32/79399_2.png) [@sandeepkanabar](https://discuss.elastic.co/u/sandeepkanabar)\
**Post date:** [October 23, 2019, 7:20am UTC](https://discuss.elastic.co/t/elasticsearch-delete-logs/204631/2 "2019-10-23T07:20:08Z")

</div>

You can look at archiving (zipping) logs older than `n` days and then you can eventually delete those.

E.g. you can zip logs older than 7 days and delete the files older than 14 days.

---

<div class="post-metadata">

**Author:** ![thebeaoliveira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thebeaoliveira/32/53314_2.png) [@thebeaoliveira](https://discuss.elastic.co/u/thebeaoliveira)\
**Post date:** [October 29, 2019, 4:53pm UTC](https://discuss.elastic.co/t/elasticsearch-delete-logs/204631/3 "2019-10-29T16:53:54Z")

</div>

Ok, thanks!! 🙂

---

<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:** [November 26, 2019, 4:53pm UTC](https://discuss.elastic.co/t/elasticsearch-delete-logs/204631/4 "2019-11-26T16:53:57Z")

</div>

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