ansible-bender
ansible-bender copied to clipboard
How to delete failed builds?
I've aquired quite a few failed builds, but I can't find how to remove them anywhere in the documentation.
So far I've tried:
for item in $(sudo ansible-bender list-builds | grep failed | awk '{ print $2}') ; do sudo buildah rmi $item ; done
sudo podman images | grep none | awk '{print $3}' | xargs sudo podman rmi
sudo ansible-bender clean
But that seems to leave some of the failed builds lying around.
What am I missing?
Hi, sorry for a late reply.
Yes, there is no command to purge failed builds, would be a great addition.
What you are doing is the best thing to do. I'd be interested in what failed builds are lingering after running those 3 commands.
I can't really tell anymore. I think it was a couple of this type here:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> a9bb55835616 2 weeks ago 932MB
But I got rid of those through "portainer". Good enough as a workaround :-)
@markgraf
Instead of sudo podman images | grep none | awk '{print $3}' | xargs sudo podman rmi
, you can use podman system prune