Your docker images / volumes are taking too much space ? There is builtin solutions for this !
First you should check how much space does docker is taking on your disk.
You can check it by running :
$ docker system df

As you can see on the result example : in this case docker is mostly taking storage with the build-cache, almost 57Gb !
Get storage back from images
To get back your storage from docker images i advise you to run « docker image prune -a » wich will delete all non used image on your system.
Get storage back from containers
To get back your contfrom docker containers i advise you to run « docker container prune -a » wich will delete all non running containers on your system. But be really carefull when running this command as it could delete containers that have been stop for multiples reasons.
Before running this command you should always run "docker ps -a » and check there is no stopped container you didn’t know about.
Get storage back from local volumes
To get back your storage from docker volumes you have to run « docker volumes prune -a » wich will delete all non used docker volumes on your system.
Get back storage from build cache
The docker build cache is really good at getting big, as it’s transparent for the user. But each time you build a different layer for your docker container : it’s saved in it !
Then in a matter of week it can get pretty big !
You can get back space of it by running « docker builder prune«
Looking for a docker GUI ?
Editing docker compose is so much easier with a GUI like Compose Craft, it’s a fully open source docker compose editor ! Not vibe coded ! under MIT licence, Compose Craft help you visualize any docker compose stack !

