/var/lib/docker/overlay2 eating up all disk space

Hi,

docker sadly keeps all images when pulling new ones. Therefore you need to do cleanups from time to time. The command to remove old images is docker image prune -f.

To drop all content generated by our container images you can run

export DOWNLOAD_DIR=$HOME/greenbone-community-container
docker-compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition down
docker container prune -f
docker image prune -f
docker volume prune -f

Please keep in mind that the last command docker volume prune -f will delete all stored data. You will loose all you users and scans.

2 Likes