Database disk image is malformed - how to delete database

Something broke and by the logs I can se that “database disk image is malformed”, and after googling it seems like I should try to delete my database (or my log?)

Only problem is I am not able to access HA through Samba anymore (suddenly wont accept username and password), and I am not able to get to the UI.

I am using in Virtualbox. I have access to the “command line”. I am able to stop Home Assistant. But what commands to I use do delete the database? Can anyone help me?

Google can help you: Linux how to delete a file.

Am I in the right place?
I have tried searching for how I can move in directories, but every command returns either not found or permission denied

So I think i managed to get into HA directory with:
docker exec -it homeassistant /bin/bash

and them i tried
rm home-assistant.log
rm home-assistant_v2.db

Did a restart, but stil same problem.

Using ls -l I can see by the size and date that they are not deleted.

Thought perhaps it was because HA was running.
Stopped HA, but when trying to get to dir I get “error response from daemon: container is not running”

And what response did you get?

nothing, just ready to type next command

If i list it, the log-file is gone…

Actually you should stop the home assistant service, then delete the file, then start the home assistant service. But anyway it is not the log file you want to delete, it is the db file.

If i stop HA I have no idea how to enter the right directory.
docker exec -it homeassistant /bin/bash creates the error response above.

How are you stopping home assistant?

Hassio ha stop

you can delete the db when it’s running… try that anyway. Then restart.

Yeah, looks like I managed to delete the db.
That got rid of the database disk image is malformed.
But still not able to access HA. Not on local IP, duckdns or HA Cloud.

I tried renaming configuration.yaml to configuration.old.yaml, to rebuild a new.
Still not able to access GUI.

This is a snippet from the ha logs: