3

When I run buildah containers, I see this

CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
f5a361407499     *     a24bb4013296 docker.io/library/alpine:latest  alpine-working-container
eb03f2eb1fb6     *     a24bb4013296 docker.io/library/alpine:latest  alpine-working-container-1
bb051587d0f0     *     a24bb4013296 docker.io/library/alpine:latest  alpine-working-container-2
876a6633ccff     *     a24bb4013296 docker.io/library/alpine:latest  alpine-working-container-3

How can I prune this list? I'm not using any of these any more. I don't see a buildah prune or buildah container prune?

When I run podman container ls I don't see any containers listed.

Evan Carroll
  • 28,578
  • 45
  • 164
  • 290

2 Answers2

4

You need to run

buildah rm -a

To prune all of the containers.

Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
1

I want to provide a minor addition to the fully correct and accepted answer that you need to run the following to prune these:

buildah rm --all

As you also wondered about not seeing those in podman container ls. You can actually get Podman to show you these containers by including the --external flag:

podman container list --external

The output will then also provide with an additional column telling you which tool owns the containers, so that you can go to that tool, in your case buildah, to prune them.