How to remove old Docker images?

0 votes
I’ve been running docker for a long time and there are a lot of unused images in my system. How can I remove all unused docker images safely?
Jul 17, 2018 in Docker by Tyrion anex
• 8,310 points
50 views

1 answer to this question.

0 votes

Run the following command:

docker $ (docker images --filter "dangling=true" -q --no-trunc)

The dangling=true filter finds any unused images

Hence, any intermediate image that is no longer referenced by a labelled image is removed.

answered Jul 17, 2018 by Sophie may
• 9,870 points

Related Questions In Docker

0 votes
1 answer

How to remove old Docker containers

There is a new feature in Docker 1.13.x called Docker ...READ MORE

answered Jul 18, 2018 in Docker by Kalgi
• 2,620 points
48 views
0 votes
1 answer

How to get docker-compose to always re-create containers from fresh images?

The containers are getting recreated to preserve ...READ MORE

answered Jul 27, 2018 in Docker by Kalgi
• 45,780 points
705 views
0 votes
1 answer

How to remove docker installed using wget

The uninstallation step mentions: sudo apt-get purge -y docker-engine sudo apt-get ...READ MORE

answered Jul 30, 2018 in Docker by Kalgi
• 45,780 points
55 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
• 56,960 points
251 views
0 votes
2 answers
0 votes
1 answer

How to run a docker command from inside the container?

You must have come across the /var/run/docker.sock file, ...READ MORE

answered Jun 28, 2018 in Docker by Sophie may
• 9,870 points
445 views