Home Assistant OS disk maxed out, database purged

Hey all, I recently was working on my system integrating some energy monitoring equipment and noticed my install was running out of storage. Its been all funky since then and I am trying to figure out what is eating up all of my space. I purged the database multiple times and saw that it purged successfully, but it didn’t clear out much space. The command df -h was the only one that I could get to give me any data, but I still am not sure what to look at for what is taking my space. Note that these issues began before I started messing with the energy monitoring. The only big addon I have is Unifi controller, maybe that is taking a ton of logs? Let me know if there are any other commands I should be running.

Install runs on RPi4 w/ 32gb sd card

(sorry its my first post here I couldn’t figure out how to copy text from Terminal & SSH and how to block it in here)

Thanks a ton everyone!

Check your logs. If something is spamming them they will fill up your drive.

I checked the logs but I’m not seeing anything too crazy. A few errors about long startup time (presumably because no storage space) in supervisor logs. In add on specific logs I saw some more things but I wasn’t seeing anything that stands out too bad.

Is there a terminal command to allow me to see the amount of space taken by each add on?

You can also use du -hs /folder to see which folder is using the most space. I’m guessing either backup or media.

Thanks for the replies everyone. Like Michael suggested, it did end up being the media folder. I swore I checked that folder before but whatever. The weird part is that all the media is stored in a directory that was for an external drive that is no longer connected. The data is still on the external drive, so why would home assistant have brought it over to the SD card as well? I’m thinking google drive backup has something to do with this but I wont know for sure since I’m not gonna plug external storage into my hassio again…but as soon as I started clearing out that media folder, google drive backup found there was available space and tried to backup again and immediately filled up my SD card by basically restoring the deleted files in that media directory. So I had to stop GDB, delete the whole directory, and now seems like things are finally back to normal again.

Thanks for all your help everyone!