Delete DB, not enough space

Hi All,

I have a similar problem like many of the users. My SD Card with 16G is at the limit because the DB is 15 GB in size.
So I followed some hints and deleted the DB.
Everything is fine after a reboot, a new DB was created.
The new DB is 1G in size but the DF and also Homeassistant says that there is less than 1G left on the SD card.
So I thought the RM command has moved the old DB into some trash folder. But I can’t find anything like this.
How can I free up the disk space now?

Cheers
Florian

The minimum recommend size is 32 GB.

Does this help?

Just FYI, this was removed in April of 2022 as an available option.

tsssk…shame on me
thanks @code-in-progress

1 Like

Did you also deleted the DB-WALL and DB-SHM file ?
Have you tried Purge ALL + Repack ?

1 Like

Yes, I have deleted also the Wall and SHM file.
This is what the folder is looking now:

image

Before I delete the DB files the .db file was 14.8G in size.
I used the rm command to remove them and have read that it deletes the file permantely not sending it to trash. But the df shows this:

image

So the space from the files is not freed from the SD Card. This makes me think that there is might be some ‘hidden’ trash folder on an SD Card?
HA also tells me that there is less that 1G of free space.

The other answers here may be helpful for a future installtion, but doesn’t help me in my current situation.

An option would be to start fresh (with at least a 32GB card) and restore a backup.

2 Likes

Have you tried REPACK ?

Seems like your DB is 9 GB and you DB-WAL is 4gb !
Do you have SQLite Web add-on installed ?
edit: sorry, i seems to read size wrong :laughing:

PS: As noone knows about your system, the history etc, i suggest you go for MaxK’s solution

Try in SSH console
cd /
then

du -sh *

You can literally run a pi with a 120GB SSD for about twice the price of an SD card. It doesn’t make sense to use SD cards anymore. That would be your best solution.

2 Likes

I have different thoughts on that. But to each their own.

I have the same meaning than MaxK to SD Cards.
My system is running for ~5 Years on this SD Card.
So it maybe that it is now corrupt and have to be replaced.
Will do it next week.
Thanks for all the replies

BTW: I have tried a repack, before I have deleted the DB.
It shrunk for 500M after that (to 14.5G)

Yes i noticed, your DB-file is not large ! now as i mentioned

13025312
this is the total used space

you get a better overview if you run

du -sh *

And try another thing, in the console
type

ha su repair

1 Like

Thanks boheme61

the ha su repair has done the trick.
The SD is now back at 76%

1 Like