ansible-bender icon indicating copy to clipboard operation
ansible-bender copied to clipboard

How to delete failed builds?

Open markgraf opened this issue 3 years ago • 3 comments

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?

markgraf avatar Aug 14 '20 07:08 markgraf

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.

TomasTomecek avatar Sep 25 '20 14:09 TomasTomecek

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 avatar Sep 30 '20 13:09 markgraf

@markgraf

Instead of sudo podman images | grep none | awk '{print $3}' | xargs sudo podman rmi, you can use podman system prune

optica-phoffmann avatar Apr 22 '22 09:04 optica-phoffmann