Skip to content

Commit a7d91b4

Browse files
authored
Merge pull request #1104 from kernelkit/prune-dangling-containers
containers: prune dangling images
2 parents fa7c743 + bb19d06 commit a7d91b4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

board/common/rootfs/usr/sbin/container

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ delete()
302302
log "$name: calling podman rm -vif ..."
303303
podman rm -vif "$name" >/dev/null 2>&1
304304
[ -n "$quiet" ] || log "Container $name has been removed."
305+
306+
cnt=$(podman image prune -f | wc -l)
307+
log "Pruned $cnt image(s)"
305308
}
306309

307310
waitfor()
@@ -757,6 +760,8 @@ case $cmd in
757760
done
758761

759762
rm -f "$pidfile"
763+
cnt=$(podman image prune -f | wc -l)
764+
log "setup: pruned $cnt image(s)"
760765
;;
761766
shell)
762767
if [ -z "$name" ]; then

doc/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ All notable changes to the project are documented in this file.
1414

1515

1616
### Fixes
17+
- containers: prune dangling images to reclaim disk space (#1098)
18+
1719
[v25.06.0][] - 2025-07-01
1820
-------------------------
1921

0 commit comments

Comments
 (0)