Delete multiple docker images at a time

0 votes

Hi Guys,

I have installed the Docker Engine in my Linux system. I have lots of images. I want to remove these images in one click. Otherwise, it is taking lots of time to delete one by one. Can anyone tell me how can I do that?

Jul 6, 2020 in Docker by akhtar
• 38,230 points
241 views

1 answer to this question.

0 votes

Hi@akhtar,

You can create your customize command to do this task. I have attached one command for your reference. It will help you to delete all the images in one go.

$ docker rmi -f $(docker images -q)

You can also create the same command to remove your docker containers.

$ docker rm -f $(docker ps -q)

I hope this will help you.

answered Jul 6, 2020 by MD
• 95,360 points

Related Questions In Docker

0 votes
2 answers
+1 vote
2 answers
0 votes
1 answer

Cannot download Docker images behind a proxy

Follow these steps Step 1- create a systemd ...READ MORE

answered Jul 27, 2018 in Docker by Kalgi
• 52,350 points
1,689 views
0 votes
1 answer

How to create a container and run images in docker?

Look for what all images you have ...READ MORE

answered Feb 23, 2019 in Docker by Kalgi
• 52,350 points
970 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,080 points
1,678 views
+2 votes
12 answers

How to run multiple commands in docker at once?

In order to run multiple commands in ...READ MORE

answered Jul 19, 2018 in Docker by Sophie may
• 10,590 points
202,339 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP