feat(script): add script to cleanup images

This commit is contained in:
yeti 2025-04-17 22:56:02 +01:00
parent 7494ad1d18
commit 791add1e93

12
clean_dangling_images.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
# Get list of image IDs with <none> 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