Member-only story
Docker Tips: Clean Up Your Local Machine
Understand disk space usage and reclaiming the unused part

In this piece, we’ll go back to basics. We will look at how Docker uses the disk space of the host machine and how to reclaim it when it is not being used anymore.

Overall Consumption
Docker is great, there’s no doubt about that. A couple of years ago, it provided a new way to build, ship and run any workloads by democratizing the usage of containers and hugely simplifying management of their lifecycle.
It also brought the developer the ability to run any applications without polluting the local machine. But, when we run containers, pull images, deploy complex application stacks, and build our own images the footprint on our host filesystem might increase in a significant way.
If we have not cleaned up our local machine for a while we might be surprised by the result of this command:
$ docker system df