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. 9 Ways to Boost the Design of Your Sports Team Website

     
  2. DevOps Tools

     
  3. The Best Marketing Apps to Use with Shopify

     
  4. Tips to Increase Software Development Speed

     
  5. Mitigating Risks In Custom Software Development

     

News Letter

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