Deleting a container image does not free up the full amount of space as reported by the "SIZE" field
Issue
- When using
podman
ordocker
to remove a container image, theSIZE
field reported in the output ofpodman image ls
is not an accurate representation of how much space is reclaimed if that image is removed. - As an example, removing a 2.65GB container image only releases 18MB of space:
$ podman image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> eb15400c0cb0 9 months ago 2.65 GB
$ df -m
Filesystem 1K-blocks Used Available Use% Mounted on
[...]
/dev/mapper/rhel-root 141172 120991 20181 86% /
$ podman rmi eb15400c0cb0
Deleted: eb15400c0cb09e234c05b6ef16f2661a19079b298760e5b5f3f8c136ce0781cf
$ df -m
Filesystem 1K-blocks Used Available Use% Mounted on
[...]
/dev/mapper/rhel-root 141172 120973 20199 86% /
- What is the
SIZE
value representing, and why is less space than anticipated freed when the container image is removed?
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat OpenShift Container Platform 3
- Red Hat OpenShift Container Platform 4
- All versions of
podman
,docker
, orcri-o
.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.