engr_s engr_s - 3 years ago 219
Python Question

How to remove multiple tags for a docker image except one

I used multiple Python base images during playing with some stuff. Currently, I am using only one Python 2.7. I want to remove the rest of them but it doesn't work. How can I do that?

Output of

docker images

python 2 fa8e55b2235d 2 months ago 673MB
python 2.7 fa8e55b2235d 2 months ago 673MB
python 2.7.13 fa8e55b2235d 2 months ago 673MB

How can I remove the tags 2.7.13 and 2 from this?

The usual
docker rmi imageID
canĀ“t work with this as they have the same ID.

Answer Source


 docker rmi python:2.7.13 


 docker rmi python:2

Syntax is repository:tag

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download