less than 1 minute read

Every now and then I run:

docker system prune --all --volumes

to remove all unused containers, networks, images (both dangling and unreferenced), and volumes.

If you want to do this cleanup, but preserve images created within the last 24 hours, you can use the --filter option:

docker system prune --all --volumes --filter "until=24h"

Via SO and docker.com.

Leave a comment