Docker Community Forums

Share and learn in the Docker community.

Clear Docker Cache

Whenever I build a Docker image using a Dockerfile on my Windows PC all the steps complete in a jiffy and it says using cache for most steps.
I worry that there is an ever increasing cache I cannot find which is cluttering my system.

I clear all images before building by running the following
docker rmi $(docker images -a -q)
I ensure there are no containers up by running
docker ps -a

I have Windows 10 Home and run Docker on WSL.

I wish to check the cache and clear it.

Check overall docker storage usage:

docker system df

Clear the build cache:

docker builder prune
1 Like