What is the "RECLAIMABLE" space displayed in docker system df?

Docker

Docker Problem Overview


One can use the command docker system df (mirror) (introduced in Docker 1.13.0) to see docker disk usage, e.g.:

username@server:~$ docker system df
TYPE                TOTAL               ACTIVE             SIZE                RECLAIMABLE
Images              44                  28                 114.7GB             84.84GB (73%)
Containers          86                  7                  62.43GB             41.67GB (66%)
Local Volumes       2                   1                  0B                  0B
Build Cache                                                0B                  0B

How is the "RECLAIMABLE" displayed in docker system df computed? I.e., what does it represent?

The Docker documentation on docker system df (mirror) doesn't explain it. The Docker glossary (mirror) doesn't contain the term "RECLAIMABLE".

Docker Solutions


Solution 1 - Docker

Hi @Franck Dernoncourt!
RECLAIMABLE is the space consumed by "unused" images (in the meaning of no containers based on thoses images is running). In other words and as @jordanm said, this is the total size of images you can remove without breaking anything, that is exactly why Docker will remove them if you run docker system prune -a or docker image prune -a. The -a tells Docker to remove all unused images, without it Docker only removes dangling (untagged) images.

You can learn more on how optimize your disk space with Docker here and here and of course Docker documentation for docker image prune and docker system prune.

Solution 2 - Docker

It's worth mentioning in addition to Kerat's answer, the command you may be looking for to free up space listed as RECLAIMABLE is docker system prune -a --volumes. Volumes will not be pruned by default if you don't include the --volumes flag.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFranck DernoncourtView Question on Stackoverflow
Solution 1 - DockerKeratView Answer on Stackoverflow
Solution 2 - DockerNic BarkerView Answer on Stackoverflow