feat(script): add script to cleanup images
This commit is contained in:
parent
7494ad1d18
commit
791add1e93
12
clean_dangling_images.sh
Executable file
12
clean_dangling_images.sh
Executable 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
|
Loading…
x
Reference in New Issue
Block a user