HA database file size 6GB

--- /home/odroid/.homeassistant -------------------------------------------------------------------------------------------------------------------------------------
    6.2 GiB [##########]  home-assistant_v2.db                                                                                                                       
  108.0 KiB [          ] /.storage
   20.0 KiB [          ]  DEADJOE
   12.0 KiB [          ]  automations.yaml~
   12.0 KiB [          ]  automations.yaml
   12.0 KiB [          ]  automations.yaml.30419
    8.0 KiB [          ]  configuration.yaml~
    8.0 KiB [          ]  configuration.yaml
    8.0 KiB [          ]  home-assistant.log

Is it safe to delete the home-assistant_v2.db file
most databases will just start a new .db file without problems.

Hmm, tracking this topic. Curious what the answer is on that

Hi
Iā€™m FTPing that file on to the laptop , but 6.2GB will take a while as the laptops on WIFI
If the HA database is using sqlite3, it should be OK to delete, but if not I have the old one I can put back.
Apparently HA has a built in function to expire logs ect after a given number of days, now looking in the docs for that

You can delete the HA database safely. All current states are stored somewhere else.
Have a look at the recorder integration options, for example, I work with a whitelist of sensors to be kept rather than including everything. Database of 30 days is around 220MB for me.

1 Like

Thanks Skye