Podman Image Prune Fails on In-Use Image

This is a problem I ran into recently and found only one other discussion of, which turned out to be unrelated to my situation. In short, running podman image prune on my system was failing with the following error message:

Error: failed to prune image: Image used by bbe74e76b2e3850ea27f2498ca4e504d271ac230a00c496a37291f3ee8d8b49c: image is in use by a container

Thing is, I had no containers on the system when this error happened. It seems that the actual problem was that I had built an image using buildah, and podman couldn't handle that.

The solution was to prune images using buildah instead. buildah rmi -p was able to clean up the dangling images and free up that storage space again.