skip to Main Content

I have two docker images with tags as dockerimage:test and dockerimage:<none>. How can I remove both of these images with a single command?

2

Answers


  1. Chosen as BEST ANSWER

    I used the command below to remove all images.

    docker rmi $(docker images -f "reference=dockerimage" -q)
    

  2. Docker doesn’t allow * to remove images using wildcard

    Get image id’s with

    docker images // or docker images -a
    

    and then run

    docker rmi imageId1 imageId2 imageId13
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search