DOCKER(1)
π DOCKER(1) β bestie edition π
okay so before we even get into it: this is page one of the Docker User Manuals, and today's main character is docker-builder-prune. buckle up, it's giving spring cleaning π§Ήβ¨
πΈ NAME πΈ
docker-builder-prune β Remove build cache
like literally, that's the whole vibe. it removes your build cache. no cap. π
β¨ SYNOPSIS β¨
docker builder prune
that's it. that's the whole spell. type it, and watch your disk breathe again π¦
π«Ά DESCRIPTION π«Ά
Remove build cache
periodt. that's the description, fr fr. your build cache has been hoarding disk space like it's collecting squishmallows, and this command is the vibe check that sends it on its way π
π OPTIONS π
four options. four little sliders. let's go one by one because i love you and i want you to know exactly what each one does π₯
-a,--all[=false] β Remove all unused build cache, not just dangling ones. so by default you're only yeeting the dangling stuff, but turn this on and it's a full-on closet cleanout. everything unused is going ποΈβ¨--filter=β Provide filter values (e.g."until=24h"). you wanna be picky? you can be picky. this is how you tell it what to prune instead of just nuking everything π―-f,--force[=false] β Do not prompt for confirmation. normally it asks you first, like a polite friend checking in. this flag says "no questions, i know what i'm doing" π€π--keep-storage=0β Amount of disk space to keep for cache. the default is0, meaning you're keeping nothing. give it a value and it'll spare that much cache so you're not starting from zero every single time π
heads up bestie: --keep-storage=0 is the default, so if you don't pass anything, it's keeping literally zero cache. plan accordingly π
π SEE ALSO π
docker-builder(1) β go read the parent page, it's iconic too π
and that's the whole page!! every flag, every default, every reference, all accounted for π
Docker Community wrote this, it's dated Oct 2026, and it lives in the DOCKER(1) section of the manual. mwah. take care of your disk and drink some water π«Άππ
π¦ where this page comes from
- alpine 3.24: docker-doc 29.9.2-r0 Β· Apache-2.0
- fedora 43: docker-cli 29.8.2-2.fc43
- fedora 43: docker-cli 29.9.2-2.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT
- fedora 44: docker-cli 29.8.2-2.fc44
- fedora 44: docker-cli 29.9.2-2.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT
- opensuse-leap 16.0: docker 29.7.2_ce-160000.8.1 Β· Apache-2.0
- opensuse-leap 16.0: docker 29.7.2_ce-160000.8.1 Β· Apache-2.0
- opensuse-leap 16.0: docker 29.7.2_ce-160000.8.1 Β· Apache-2.0
- opensuse-leap 16.0: docker 29.7.2_ce-160000.8.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms