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,170 points
148 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,180 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,310 points
1,102 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 22, 2019 in Docker by Kalgi
• 52,310 points
572 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,120 points
1,156 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,550 points
131,212 views