From 4e434f1243049c00e2fefdba1a89288683e82015 Mon Sep 17 00:00:00 2001 From: Satish Jhanwer Date: Fri, 7 Dec 2018 00:51:50 +0530 Subject: [PATCH] chore: updated docker-rmi command readme file (#25832) added example to remove the list of images having a particular text in it. --- guide/english/docker/docker-rmi/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guide/english/docker/docker-rmi/index.md b/guide/english/docker/docker-rmi/index.md index 34d1f5437d..69ed3ae4b1 100644 --- a/guide/english/docker/docker-rmi/index.md +++ b/guide/english/docker/docker-rmi/index.md @@ -18,6 +18,12 @@ You may remove multiple images at the same time. The first thing you will want t Write Images IDs in the command followed by the spaces between them. +### Remove Specific images using image name + +Using `grep` command we can filter the images what we need to remove and then we can pass this output into `docker rmi` command. + +`docker rmi -f $(docker images | grep )` + ### Remove all images at once To remove all images there is a simple command to do that. `docker rmi $(docker images -q)`