How to delete multiple docker images at once?

0 votes
I am having multiple docker images running on my localhost. I can delete all those images by using:

docker rmi image_id

I want to delete all those images at once.Is there a way to delete all those images at once.

Can anyone help me with these?
Nov 21, 2018 in DevOps & Agile by Damon Salvatore
• 5,490 points
66 views

1 answer to this question.

0 votes

Here is what you can try.

There is a command to list all the image id's i.e.,

docker images -q

To remove all the images use the below command i.e 

docker rmi $(docker images -q)

It might happen that some of the images are being used by a container. 

So, you will have to stop those containers.

I hope that the above explanation will resolve your query.

answered Nov 21, 2018 by Shubham
• 1,000 points

Related Questions In DevOps & Agile

+1 vote
2 answers

How do I run Apache server from Docker without mapping to a location?

If you're seeing a 500 error, that's ...READ MORE

answered Oct 18, 2018 in DevOps & Agile by lina
• 8,100 points
60 views
0 votes
1 answer

How to get remote access to a private docker-registry?

New client version refuses to work with ...READ MORE

answered Jul 31, 2018 in DevOps & Agile by Kalgi
• 37,320 points
66 views
0 votes
1 answer
0 votes
1 answer
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
• 56,160 points
98 views
+2 votes
6 answers

How to add a volume to Docker, but also exclude a sub-folder?

Here is what you can try if ...READ MORE

answered Nov 21, 2018 in DevOps & Agile by Shubham
• 1,000 points
1,623 views