How to remove old and unused Docker images or stop Docker Containers or remove Docker Volumes

This post explains how to remove old or unused docker images, how to remove stopped containers, how to remove unused volumes, how to remove unused networks or a single command to run all prunes at a time

Note: These command works for Docker with version 1.13 or higher

Command to remove unused Images

docker image prune

Command to removed stopped Containers


docker container prune

Command to remove unused Volumes


docker volume prune

Command to remove unused Networks


docker network prune

Command to run all Prunes at a time


docker system prune

It is suggested that not to use system prune command. This may remove the things which users doesn't want to remove.

This is how we remove old or unused docker images, or remove stopped containers, or remove unused volumes, or remove unused networks or run all prunes at a time.

For more posts on Docker please visit: docker

No comments:

Post a Comment