HASSIO Docker Overlay2 folder consuming all disk space

I tried all the options provided in this thread, but nothing really cleans up anything, my Overlay2 folder is still big and growing. This has been the case for a very long time and no real solution is available as far as I can see. I have to create a new VM every few months because they keep on growing (>30GB).

Is there really no solution for this issue?

Am I the only one with this issue?

I have the same problem, do you know how to clean this file?

I don’t. I hope to find out if many people are having this issue, and why this issue occurs. Is it my setup or is it an issue in Docker itself (I read somewhere that this could be an issue not related to HA itself, but more the Docker environment).
Anyhow, for me it is a bit annoying that every 2/3 months I have to reinstall HA completely because it is running out of disk space.

Started using HA more than a year ago and haven’t had any issues. However this has just started becoming one.

Hi everyone,
I also found out i have this issue.
I did what @clabnet recommended:

#/bin/bash
#Remove images not used by containers
docker image prune -a
#Remove containers not used on last 24hours
docker container prune --filter "until=24h"
#Remove volumes not used by containers
docker volume prune
#Check space used by logs
journalctl --disk-usage
#Remove journald log files
journalctl --rotate
journalctl --vacuum-time=1m

and removed several Gb from my disk…but overlay is still 3.6Gb.
I noticed I have two overlay mounted disks, eacho of them 4.8Gb. Maybe this is related?

1 Like

I tried all these, but the journal is no issue (only something like 300MB) and the docker commands do not remove anything for me.

The same issue. Overlay2 directory consumed about 14 GB. After issuing “ha su repair” it is reduced to 10.8GB. Docker purge commands do not clear anything.

image

And only the part of overlay2 directory:

There are 170 subdirectories inside that folder! I don’t know if I should mention that I have about 10 addons installed…

Same here. I’m on a Proxmox VM with HassOS. The overlay2 eats up 31.5 GB of storage.
The cleaning routine and ha repair only released a few GB.

same here overlay2 almost 10GB
nothing from this topic help :frowning:

Just to add, I’m in the same boat. Proxmox VM and the Overlay2 folder had swollen to 18GB. Have recovered some space using commands here, but it’s still 15GB and I’m running out of space.

Will keep an eye on this thread.

2 year old system.
Used
ha su repair

83gb cleared :laughing:

overlay2 increasing and killing my HAOS, nothing of the provided commands help:

I have multiple 11.6G overlay files, and no listed commands flush them

Anybody has a solution?
ha su repair does not work and it is now taking 129gb…

image

1 Like

Experiencing the same issue, I’ve asked for support on Discord.

Experiencing this same issue, the directory is taking up over 60GB of space.

Did you get a reply on your question?

Same problem here!

Hi, I am having a disk space issue as well and I am suspecting it is this overlay2 folder taking up disk space. My DB is less than 400MB, backups folder is 360MB. df -h shows 11.3GB used, while du -sh shows just 1.3 GBs used.

[core-ssh /]$ df -h
Filesystem                Size      Used Available Use% Mounted on
overlay                  23.9G     11.4G     11.3G  50% /
devtmpfs                978.6M         0    978.6M   0% /dev
tmpfs                   980.6M         0    980.6M   0% /dev/shm
/dev/sda8                23.9G     11.4G     11.3G  50% /data
/dev/sda8                23.9G     11.4G     11.3G  50% /config
/dev/sda8                23.9G     11.4G     11.3G  50% /ssl
/dev/sda8                23.9G     11.4G     11.3G  50% /addons
/dev/sda8                23.9G     11.4G     11.3G  50% /backup
/dev/sda8                23.9G     11.4G     11.3G  50% /share
/dev/sda8                23.9G     11.4G     11.3G  50% /media
tmpfs                   392.2M      1.0M    391.2M   0% /run/dbus
/dev/sda8                23.9G     11.4G     11.3G  50% /etc/asound.conf
/dev/sda8                23.9G     11.4G     11.3G  50% /run/audio
/dev/sda8                23.9G     11.4G     11.3G  50% /etc/resolv.conf
/dev/sda8                23.9G     11.4G     11.3G  50% /etc/hostname
/dev/sda8                23.9G     11.4G     11.3G  50% /etc/hosts
tmpfs                   980.6M         0    980.6M   0% /dev/shm
/dev/sda8                23.9G     11.4G     11.3G  50% /etc/pulse/client.conf
tmpfs                   980.6M         0    980.6M   0% /proc/asound
tmpfs                   980.6M         0    980.6M   0% /proc/acpi
devtmpfs                978.6M         0    978.6M   0% /proc/kcore
devtmpfs                978.6M         0    978.6M   0% /proc/keys
devtmpfs                978.6M         0    978.6M   0% /proc/timer_list
tmpfs                   980.6M         0    980.6M   0% /proc/scsi
tmpfs                   980.6M         0    980.6M   0% /sys/firmware
[core-ssh /]$ du -sh
1.3G    .

I run HassOS (supervised on a VM installed from the ova file). If I am not mistaken, that runs docker in the backend, the problem is I cannot access the /var/lib/docker folder, since it is not there. Also, I cannot run the docker system prune --all --volumes --force command. Can someone help me?

[core-ssh /]$ cd /var/lib/
[core-ssh lib]$ ls -la
total 28
drwxr-xr-x    1 root     root          4096 May 31 20:51 .
drwxr-xr-x    1 root     root          4096 May 31 20:51 ..
drwxr-xr-x    2 root     root          4096 Mar 29  2023 apk
drwxr-xr-x    2 root     root          4096 May 31 20:51 dbus
drwxr-xr-x    2 root     root          4096 Mar 29  2023 misc
drwxr-xr-x    2 root     root          4096 Mar 29  2023 udhcpd
[core-ssh lib]$ ha docker info
logging: journald
registries: {}
storage: overlay2
version: 24.0.6

Ran ha su repair but that did not free any disk space.

Also, I noticed my disk space started to grow after installing the ESPhome add-on, does this make sense or is it just coincidence?

Thanks!

You might be on so something concerning the relation between ESPHome install and the growing overlay2 folder. My disk size started decreasing after this install too!