Docker: Pruning Unused Resources

An avatar of David Neuman
David Neuman // October 13, 2020
1 minute read
Feature image

Docker doesn’t explicitly perform garbage-collection on unused images, containers or volumes. Without specifically asking Docker to remove unused disk space you may eventually receive a similar error message:

ERROR: Service XXXX failed to build: Error processing tar file(exit status1): no space left on device

Clearing up space is fairly simple.

// Prune all resources
docker image prune
docker container prune
docker volume prune