15

I use docker since 5months and I never got this problem. I have 2 images with the same ID so I want to delete the one who I know that it's deprecated. The thing is that it has no ID and when I try to do

 dk rmi -f gitlab-lab:5005/xs/mgmt-docker-gui

I got an error :

Error response from daemon: No such image: gitlab-lab:5005/xs/mgmt-docker-gui:latest

So how can I delete this one and not the other one who has the same ID ?

jerome/mgmt-docker-ui                latest              537b5ea5aa7b        4 days ago          476 MB
gitlab-lab:5005/xs/mgmt-docker-gui   <none>              537b5ea5aa7b        4 days ago          476 MB
Jerome
  • 1,162
  • 2
  • 16
  • 32
  • 1
    See if this helps - http://stackoverflow.com/questions/32723111/how-to-remove-old-and-unused-docker-images – Rao Mar 14 '17 at 06:53
  • Possible duplicate of [How to remove old and unused Docker images](https://stackoverflow.com/questions/32723111/how-to-remove-old-and-unused-docker-images) – kenorb Apr 13 '18 at 00:10

1 Answers1

29

I believe that you are referring to image with tag <none>. If so, then you can delete using dangling switch.

docker rmi $(docker images -f dangling=true -q)
Rao
  • 20,781
  • 11
  • 57
  • 77