[SOLVED] Disk space grows after each snapshot upgrade (openhabian)

Hello,

my disk space (SD card) grows after each snapshot upgrade.
see grafics:

image

image

I’m assuming, that here surely temporary files put on, which one could delete after the installation again?

Since I run daily backup, I would like to keep the image as small as possible.
Does anyone know how to clean up the disk space again?

EDIT:

after:

sudo apt-get clean

from 3900MB to 2400MB

image

THX a lot

OFF-TOPIC

I use dd gzip for Backup. After the cleanup, the created image was unfortunately still 4.3GB in size.
I stopped openhab and then I overwrote the free space with a ZERO file. Then I deleted the ZERO file and started openhab again.

sudo su 
systemctl stop openhab2 

sudo dd if=/dev/zero of=zero.file
sudo rm -f zero.file

systemctl start openhab2 
 

After that, the gzip backup needed only 800MB.

Are you running OpenHabian? This might be caused by etckeeper which stores the file versions.

yes it is running on a raspberry with openhabian.
Could you tell me more about the etckeeper and who I could delete this files?

I doubt etckeeper is the problem. It just keeps track of config changes, which are usually small text files.

Have a look at

/var/cache/apt

This directory stores all software upgrades.

You can clear these caches with:

sudo apt-get clean

wow :open_mouth:
after

sudo apt-get clean

from 3900MB to 2400MB

image

THX a lot

2 Likes

Thank you too! I was hoping you would show us a new graph with the gained space. :smile: