Docker

        I started using Docker from last week. I knew that images and containers take a lot of space due to the cache mechanism of Docker. So I started by removing images, a container that I’m not using anymore, but doing this manually consumes lots of time. After some research, I saw that newer versions of Docker already implemented commands that are used for this task. So I removed all unused images and containers and made about 1.5 GB more available. The same docs also provided commands for removing networks and volumes. What surprised me where the volumes, after I removed those I got an extra of 15 GB of memory. I never realized how much space Docker is allocating to them.

Docker Cleanup Command

# Remove all stopped containers
docker container prune

# Remove all unused volumes
docker volume prune

# Remove unused images
docker image prune

# Remove unused network
docker network prune

­# Remove all unused containers, volumes, images (in this order)
docker system prune