Commit a3971a3
committed
containers: prune dangling images
Previously, upgrading Podman containers with the same tag left
behind dangling images, causing overlay storage to grow and fill
disk space.
This change ensures dangling images are cleaned up using
podman image prune. The command is run without -a, so only
unreferenced images are removed. This provides safe cleanup while
preventing unnecessary overlay growth.
It's worth noting that when upgrading a container image using system
wide upgrade and reboot, then it's normal for one dangling image to be
left on the system after reboot. This is because the prune is done at
shutdown. When rebooting after upgrade the running container is still
valid and after the reboot the old container is replaced and left
dangling until the next reboot. There should be no case where more
than two image (one dangling) exists for a particular container.
Fixes #1098
Signed-off-by: Richard Alpe <[email protected]>1 parent fa7c743 commit a3971a3
2 files changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
305 | 308 | | |
306 | 309 | | |
307 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
0 commit comments