Votes: 0Posted On: Oct 05, 2017 06:25:21
Docker is designed in such a way that it uses containers and makes the applications easy to create, deploy, and run.
Using a container, one can package up an application with libraries and deploy it as one package. By doing so, the application will run on any other Linux machine regardless of any customized settings that machine might have.
But as you work with Docker, you may end up accumulating an excessive number of unused images, containers, and data volumes that will consume disk space and affect the output.
Hence in order to clean up the old unused Docker images, you can use the command line to perform this task.
The following command will show you how to remove all the images of Docker.
(Note : All the Docker images on a system can be listed by adding -a to the docker images command)
docker images -a
Remove: ( Once you're sure you want to delete them all, you can add the -q flag to pass the Image ID to docker rmi)
docker rmi $(docker images -a -q)