DEV Community

Discussion on: Docker high disk space usage 💾 📈

Collapse
 
gholami1313 profile image
Mohammad Gholami

Most of the time we need many of those deleted images, so we have to pull them again and build the Dockerfiles.
You can also delete dangling images and it also saves lots of space for you:

docker rmi $(docker images -f "dangling=true" -q)
Enter fullscreen mode Exit fullscreen mode

or if you need root permission:

sudo docker rmi $(sudo docker images -f "dangling=true" -q)
Enter fullscreen mode Exit fullscreen mode