Clean command that deletes unused docker images could be useful. A common issue with using docker is the /var/lib/docker/ folder may take up gigabytes of space which will eventually cause an out of disk space issue on the host system.
Sometimes there are leftover docker images of previously ran docker containers that have not been cleaned up. These images can be removed by running the command below, which will remove all data of non-running containers. source
docker system prune -a --volumes
Removing unused and dangling images will help us to reclaim disk space. We can achieve this using the image prune child command. We can use the system prune child command to remove multiple unused objects in one go. This command removes all unused networks, images, containers (if closed), dangling build caches, and optionally, volumes.
Clean command that deletes unused docker images could be useful. A common issue with using docker is the /var/lib/docker/ folder may take up gigabytes of space which will eventually cause an out of disk space issue on the host system.
Sometimes there are leftover docker images of previously ran docker containers that have not been cleaned up. These images can be removed by running the command below, which will remove all data of non-running containers. source
docker system prune -a --volumes
Removing unused and dangling images will help us to reclaim disk space. We can achieve this using the image prune child command. We can use the system prune child command to remove multiple unused objects in one go. This command removes all unused networks, images, containers (if closed), dangling build caches, and optionally, volumes.
docker image prune -a -f