How can I remove my cached docker layers?

Running docker images --no-trunc --format '{{.ID}}' | xargs docker rmi or docker volume prune -f will delete all of the images and their layers from the volume connected to your job.

Because of how DLC works you might need to leave this command in your config and run several jobs to remove the DLC layers from all volumes associated with your project.

Alternatively, you can use the config below to run a very short job that consumes all 50 DLC volumes and purges docker caches. You can push it to a feature branch without disrupting your main branches:

version: 2
- image: cimg/base:2020.01
parallelism: 50
- setup_remote_docker
- run: docker volume prune -f


If you're running into issues where stale volume caches are causing problems often, then consider using our new docker registry image cache orb as a substitute. It's more suitable for projects that have high concurrency throughput, or jobs that use parallelism due to the limited number of volumes available.

If you notice errors always happen on the same volume, which you can see by checking the "spin up environment" step or "remote docker" please contact support 

Was this article helpful?
26 out of 68 found this helpful



Article is closed for comments.