File system space

Have a 16Gb SD card in the PI and have been running Brewblox since released on Beta.

Looked today and only have 940Mb of free space left.

Output of sudo du -k | sort -n -r | head shows the following large folders.

13609764        ./var
13021772        ./var/lib
12932596        ./var/lib/docker
11700520        ./var/lib/docker/overlay2
1217000 ./usr
1182536 ./var/lib/docker/volumes
534124  ./usr/lib
482012  ./var/cache
473620  ./var/cache/apt

Obviously most space is used in the overlay2 folder.

any ideas how to reduce this?

docker image prune will remove all unused docker images (old versions, no-longer-used base images)

I’m not 100% sure where they’re stored, but on a longer-running system with frequent updates, this may free a few GB.

@Bob_Steers

Perfect, that cleared it down. Now / file system is only using 3.8Gb.

Maybe we should include some pruning in our update scripts. If possible only prune our own images.