Deleting a container image does not free up the full amount of space as reported by the "SIZE" field

Solution Unverified - Updated -

Issue

  • When using podman or docker to remove a container image, the SIZE field reported in the output of podman 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, or cri-o.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content