Skip to content

Blog

Docker Disk Space Explosion and How to Clean It Up

At the spring cleaning of my computers, I noticed that one device I had nearly no disk space left. After removing old files and the usual suspects (like Windows updates) I found that Docker uses the most space.

While Docker Desktop for Windows showed me a disk usage of around 50 GB, TreeSize found 124 GB - far too much for the few containers that run on this machine. To clean-up the storage, I first tried the prune command to remove unused data:

Clear Your Windows Terminal With cls

In a Linux console we can use the clear command to get rid of all text output in that windows. This is a great help to quickly get an empty terminal without opening another console.

If we try to run the same command in the CMD on Windows, we get an error about a missing command. For a long time, I accepted this behaviour as a lack of functionality in the Windows terminal. However, recently I wondered if I just missed a command and started looking for a solution.