I'm trying to understand how I can clean up the disk by lowering the disk usage. I applied docker image prune -a
but it reclaimed all of 0 bytes, lol, so it didn't seem to work for me in the way I was hoping.
The reason for this is I'm using the Public Cloud instance of OVH but specifically their "flexible" cloud instance so that the instance can be sized up and down for CPU and memory rather than only up. The downside is it gives only a 50 GB hard disk on a flexible instance which is fine with me though as block storage is pretty inexpensive. So I have boxdata
and appsdata
on different external block storage disks with plenty of space.
But the main disk is still quite consumed by Docker. Here's my current usage for the main disk:
/dev/sda1 mounted at /
41.1 GB used of 51.84 GB
Speed: 1180 MB/sec
This disk contains:
docker 14.37 GB
docker-volumes 5.51 GB
platformdata 5.48 GB
/apps.swap 4.29 GB
Everything else (Ubuntu, etc) 11.45 GB
I have considered reducing the swap if possible since I have ample memory, but I'd rather keep it if needed.
The docker is over 14 GB, and docker-volumes just over 5 GB. Basically the main "Docker" tag is the main user and to some degree I think that makes sense as it's the main platform, but I'm curious if it should be that high still. I noticed another post where a user tried the docker image prune -a
and reclaimed nearly 10 GB to squeeze it down to closer to 4 GB but that didn't do anything for me unfortunately.
sudo docker image prune -a
WARNING! This will remove all images without at least one container associated to them.
Are you sure you want to continue? [y/N] y
Deleted Images:
untagged: registry.docker.com/cloudron/base:4.2.0
untagged: registry.docker.com/cloudron/base@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4
deleted: sha256:6ec7c1ab3983e1ebdbf75ced0e8089db363083aa4ed004be0022d45bafaef4f9
Total reclaimed space: 0B
It looks like the images are the main thing when I run the docker system df
command (accounts for the full docker stat on the Cloudron disk usage chart):
sudo docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 22 22 14.37GB 2.21GB (15%)
Containers 87 64 0B 0B
Local Volumes 162 134 5.537GB 1.667GB (30%)
Build Cache 0 0 0B 0B
What's odd is that it shows nearly 3+ GB of reclaimable space, but it seems like that isn't actually recoverable to add back to available disk space, at least not in any way that I've found so far.
Is there anything I can do here to help conserve space, is there perhaps any commands I can run to clean things up further for Docker? Any guidance would be appreciated. If needed I may just get a small external block storage for the platform data
but I am hoping to avoid that so I can keep all the DB stuff on the main higher-performing disk.