Since the docker version 1.13 you can use the docker prune command to remove all dangling data such as containers stopped, volumes without containers, and images with no containers.
To remove dangling docker images you execute the following command:
You can also add an optional -a option to the command to remove all dangling as unused images. Unused, in this case, means unreferenced by another container
Docker before version 1.13
To remove dangling and unused docker images, you can use the following commands:
Got an article suggestion?
Let us know
BY
NC
SA
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.