Deleting Many Docker Images at Once
Using awk

Suppose that we have so many docker images on our local computer as a result of building many versions of images...


Show all images that contains "myimage":

docker images | grep myimages


Get only IMAGE ID column (the 3rd column):

docker images | grep myimages | awk {'print $3'}


Force delete images with those ID:

docker images | grep myimages | awk {'print $3'} | xargs docker rmi --force 

Visit vitraining.com for Odoo training and consultation services.

Deleting Many Docker Images at Once
vitraining, odoo indonesia
7 May, 2020
Share this post
Archive
Sign in to leave a comment
How to upload file in website page?
from a regular HTML Form