Docker images eats up lots of space? Docker images eats up lots of space? docker docker

Docker images eats up lots of space?


To get rid of "dangling" images, run the following:

$ docker rmi $(docker images -q -f dangling=true)

That should clear out all the images marked "none". Be aware however, that images will share base layers, so the total amount of diskspace used by Docker will be considerably less than what you get by adding up the sizes of all your images.


Use docker ps -a to get the container ID and image ID. You can remove the container with

 docker rm <containerID>

Then you can remove the image with

 docker rmi <imageID>


According to the answer given here,

  • /var/lib/docker/aufs/diff/ has the file contents of the images.
  • /var/lib/docker/graph/ now only contains metadata about theimage, in the json and layersize files.
  • /var/lib/docker/repositories-aufs is a JSON file containing localimage information. This can be viewed with the command docker images.

    Refer to this link, Docker containers can be stopped and deleted by the following commands

  • docker ps

  • docker stop
  • docker rm containerid
  • docker rmi imageid