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,980 points
4,187 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

0 votes
2 answers

How to build docker images using VS2017?

Open Visual Studio and create a new project. Select ASP.Net Core Web ...READ MORE

answered Aug 25, 2020 in DevOps & Agile by Pistle
• 1,000 points
1,359 views
0 votes
1 answer

how to deploy docker images to deploy servers using jenkinsfile

Hi, You can do this in multiple ways. ...READ MORE

answered Sep 1, 2020 in DevOps & Agile by MD
• 95,460 points
1,326 views
+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,220 points
2,193 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
• 52,350 points
2,380 views
0 votes
2 answers
+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,020 points
2,715 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
25,652 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP