Docker no space left on device

Docker uses /var/lib/docker to store all container images and volumes sometimes the disk mounted to /var/lib/docker is full and gives error no space left on device

One way to fix this remove all unused containers, for a full clean up you can use this

docker system prune --all --force --volumes

Increase available disk space in docker

One another method if you have space in your home folder move the docker directory to home folder and create system link to it

sudo systemctl stop docker
sudo mv /var/lib/docker /home/
sudo ln -s /home/docker/ /var/lib/
sudo systemctl start docker

Remove images that one month or old

docker system prune --filter "until=240h"