diff --git a/clean_dangling_images.sh b/clean_dangling_images.sh new file mode 100755 index 0000000..96a9f8c --- /dev/null +++ b/clean_dangling_images.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Get list of image IDs with tag (dangling images) +dangling_images=$(podman images -f "dangling=true" -q) + +if [ -z "$dangling_images" ]; then + echo "✅ No dangling images to remove." +else + echo "⚠️ Removing dangling images..." + echo "$dangling_images" | xargs podman rmi -f + echo "🧹 Done!" +fi