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,270 points
51 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 980 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
50 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
• 35,800 points
49 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,120 points
60 views
+2 votes
6 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.