# Kibana log file (kibana.log, Size is 38.2 GB) is too large in (/var/log/kibana) how to free space or delete old logs from file. If i delete this files should i lost index log data?

**URL:** <https://discuss.elastic.co/t/kibana-log-file-kibana-log-size-is-38-2-gb-is-too-large-in-var-log-kibana-how-to-free-space-or-delete-old-logs-from-file-if-i-delete-this-files-should-i-lost-index-log-data/308557>\
**Category:** Kibana\
**Tags:** kibana-plugin-development\
**Created:** [June 30, 2022, 10:11am UTC](https://discuss.elastic.co/t/kibana-log-file-kibana-log-size-is-38-2-gb-is-too-large-in-var-log-kibana-how-to-free-space-or-delete-old-logs-from-file-if-i-delete-this-files-should-i-lost-index-log-data/308557 "2022-06-30T10:11:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbkunbi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bbkunbi/32/107767_2.png) [@bbkunbi](https://discuss.elastic.co/u/bbkunbi)\
**Post date:** [June 30, 2022, 10:11am UTC](https://discuss.elastic.co/t/kibana-log-file-kibana-log-size-is-38-2-gb-is-too-large-in-var-log-kibana-how-to-free-space-or-delete-old-logs-from-file-if-i-delete-this-files-should-i-lost-index-log-data/308557/1 "2022-06-30T10:11:42Z")

</div>

![Screenshot from 2022-06-30 15-40-52](https://us1.discourse-cdn.com/elastic/original/3X/e/2/e286e682d03c9341b128a61491cb084bb281c7da.png)

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [June 30, 2022, 5:04pm UTC](https://discuss.elastic.co/t/kibana-log-file-kibana-log-size-is-38-2-gb-is-too-large-in-var-log-kibana-how-to-free-space-or-delete-old-logs-from-file-if-i-delete-this-files-should-i-lost-index-log-data/308557/2 "2022-06-30T17:04:54Z")

</div>

Try using index lifecycle management, which is available in ELK stack 6.6 newer version.

Please check this link:

> **[Getting started with index lifecycle management | Elasticsearch Guide \[6.6\] |...](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/getting-started-index-lifecycle-management.html)**

This will create new index when size goes beyond 2GB or 1d, and it will delete 1day back data.

```auto
PUT _ilm/policy/stream_policy
{
  "policy": {
    "phases": {
      "hot": {
        "actions": {
          "rollover": {
            "max_size": "2GB" ,   
            "max_age": "1d"
          }
        }
      },
      "delete": {
        "min_age": "1d",
        "actions": {
          "delete": {} 
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![bbkunbi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bbkunbi/32/107767_2.png) [@bbkunbi](https://discuss.elastic.co/u/bbkunbi)\
**Post date:** [July 1, 2022, 5:04am UTC](https://discuss.elastic.co/t/kibana-log-file-kibana-log-size-is-38-2-gb-is-too-large-in-var-log-kibana-how-to-free-space-or-delete-old-logs-from-file-if-i-delete-this-files-should-i-lost-index-log-data/308557/3 "2022-07-01T05:04:42Z")

</div>

Thank you mam,

can i delete kibana.log file using below command to free space? is it affect the data which i logged in kibana index?  
==\> cat /dev/null \> kibana.log

---

<div class="post-metadata">

**Author:** ![Kushal\_Roy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kushal_roy/32/105241_2.png) [@Kushal\_Roy](https://discuss.elastic.co/u/Kushal_Roy)\
**Post date:** [July 1, 2022, 5:25am UTC](https://discuss.elastic.co/t/kibana-log-file-kibana-log-size-is-38-2-gb-is-too-large-in-var-log-kibana-how-to-free-space-or-delete-old-logs-from-file-if-i-delete-this-files-should-i-lost-index-log-data/308557/4 "2022-07-01T05:25:40Z")

</div>

maam can you answer my topic as well??

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 1, 2022, 5:55am UTC](https://discuss.elastic.co/t/kibana-log-file-kibana-log-size-is-38-2-gb-is-too-large-in-var-log-kibana-how-to-free-space-or-delete-old-logs-from-file-if-i-delete-this-files-should-i-lost-index-log-data/308557/5 "2022-07-01T05:55:27Z")

</div>

Hi @bbkunbi

The Kibana logs You are showing have nothing to do with the indices data that is stored within elasticsearch.

The one exception would be if you use filebeat to process the kabana logs and put them in elasticsearch.

I suspect you are not doing that.

Even with that, if you erase the Kibana log, you're not going to erase the data that resides inside elasticsearch... They are two completely separate things.

The Kibana logs that you are referring to are simple Kibana application logs.. nothing more.

You should refer to this

> **[Configure logging | Kibana Guide \[8.3\] | Elastic](https://www.elastic.co/guide/en/kibana/current/logging-configuration.html)**
>
> A list of the supported authentication mechanisms in Kibana.

So yes you could clean up those logs to free up space.

---

<div class="post-metadata">

**Author:** ![bbkunbi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bbkunbi/32/107767_2.png) [@bbkunbi](https://discuss.elastic.co/u/bbkunbi)\
**Post date:** [July 1, 2022, 7:11am UTC](https://discuss.elastic.co/t/kibana-log-file-kibana-log-size-is-38-2-gb-is-too-large-in-var-log-kibana-how-to-free-space-or-delete-old-logs-from-file-if-i-delete-this-files-should-i-lost-index-log-data/308557/6 "2022-07-01T07:11:34Z")

</div>

Thank you! 😊

---

<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 29, 2022, 7:12am UTC](https://discuss.elastic.co/t/kibana-log-file-kibana-log-size-is-38-2-gb-is-too-large-in-var-log-kibana-how-to-free-space-or-delete-old-logs-from-file-if-i-delete-this-files-should-i-lost-index-log-data/308557/7 "2022-07-29T07:12:26Z")

</div>

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