I accidentally left a dev version of an app running in debug mode for a few days, and now my Green is very low on storage. I've deleted backups, I have no media, my recorder database is minuscule, and my Storage view shows that 23.7 out of the 24.3 GB used is 'system', so I'm 99% sure it's logs. But I don't have access to clear out the system logs via the Terminal & SSH app (as far as I know), and my other websearches have come to naught. Is there an obvious-to-everyone-else method of forcing a vacuum of the journalctl logs that I'm missing?
#Clearing logs in Home Assistant Green (HAOS)?
1 messages · Page 1 of 1 (latest)
I kind of doubt that (they are limited to 4G) but check yourself: https://gist.github.com/Impact123/fb086b391f7d14cb3515144fcbe4785e
Also if you insist to vacuum you can get a shell to the OS like this: https://gist.github.com/Impact123/e9a4a07b184eb393d2ff762e3b1b0a05#get-a-os-level-shell
Oh man, just having direct access is perfect. I was saying journalctl/vacuum because that's all I could think of that was left, but I was absolutely working blind. Thank you, now I can actually find the issue. 🙇♂️
Yup, that'll do it:
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 19 17 21.11GB 18.93GB (89%)
Containers 17 17 290.4MB 0B (0%)
Local Volumes 0 0 0B 0B
Build Cache 36 0 5.468GB 1.834GB```
Note that this does not show the bind mount data. HAOS doesn't usually use volumes. Better use the gdu way in my link for that.
Also ha supervisor repair does something similar to docker system prune.
I ran the prune and now realize I was reading that docker system df output backwards, in that I'm now down to 17GB used with 100% of it reclaimable. I thought the "reclaimable" portion was the amount that could be pruned, but it was the inverse, so 11% in the screenshot above. But! I now have 8GB free and breathing room to figure out what I'm going to do going forward, in terms of giving myself more space. Thank you tons this has been incredibly helpful all around.
Oh, and gdu / showed my most-used space as /var at 517MB, which is basically all the journalctl logs, capped as you said.
Sounds like you ran it in the app's context. Make sure you run gdu via the full access way: https://gist.github.com/Impact123/fb086b391f7d14cb3515144fcbe4785e#full-access-to-files
Unless you excluded /host/mnt intentionally, of course.