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 in Docker by akhtar
• 18,250 points
63 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 by MD
• 42,420 points

Related Questions In Docker

0 votes
2 answers
0 votes
2 answers
+1 vote
11 answers

How to run multiple commands in docker at once?

Try this: docker run image bash -c "cd ...READ MORE

answered Apr 17, 2019 in Docker by anonymous

edited Apr 17, 2019 by Kalgi 79,492 views
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
• 51,890 points
593 views
0 votes
1 answer
0 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
• 57,550 points
668 views
0 votes
1 answer

How can I connect a docker container to two docker networks that I have created?

Hi@akhtar, It's correct that the network argument of ...READ MORE

answered Mar 23 in Docker by MD
• 42,420 points
143 views
0 votes
1 answer