Clean Docker Images

Each time docker makes a rebuild a new image file is added up which consumes a decent amount of disk space, this is how to get rid of it.

Advert

With each build Docker gets a new image, it does a good management of taking care of old files but some builds does come with dangling ones, which just eats your disk.

To get the list of images on your system open terminal and run

docker images
List of docker image in the system.

It's a straight forward task on a machine with GUI. Hit Remove all data you are good to go. ( This will remove all images )

To perform the same action on command line

docker rmi $(docker images -a -q)

This will remove all images on your systems ( except the ones that are in use by a docker machine ).

Remove Dangling Images

Most times you only need to remove the dangling to free disk space.

docker rmi $(docker images -f dangling=true -q)i

Comments

Wow ! you have someting to tell us. That's great! Please keep in mind that comments are moderated, we employ rel="nofollow" for links, avoid using a spammy word or a domain in name field, it might end up as a Spam. Thanks for reading.

Last 5 Articles

All Articles >

  1. 3 Facebook Tips and Tricks Your Local Business Will Benefit

     
  2. Clean Docker Images

     
  3. Development Environment for Django in Docker Compose

     
  4. How Online Reviews Impact Local SEO

     
  5. 3 Money-Saving Tips For Your Company

     

News Letter

Subscribe to our email newsletter for useful tips and valuable resources, sent out every new article release.