Technology, Tutorial, Ubuntu

How to Wipe Out a Podman Container with Podman-compose Setup

Its kind of a tricky post I’m making here because actually there is no difference between how you remove the containers whether it was created with podman-compose or otherwise.

However, it took me a long time to figure that out and get the quick and simple answer so here is a blog to cut to the chase.

If you created a container using podman-compose and then realized that you just want to wipe it, all you have to is this (this assumes your volumes are persistent):

1. Shut down your container using podman-compose -f path/to/compose.yml down

2. List your volumes to be triple sure that they are there and that you get the name correct (this command is final when you run it!): podman volume ls

3. Wipe out the carefully-confirmed volume with podman volume rm <volume-name>

LAST REMINDER! Careful on the last command. That command is final with no warnings! Boom, gone, vapour…

TIP: if you have multiple volumes associated with your wipe-out (I had 5 associated with mine), you can mass wipe them simply separating the volume names with spaces like this: podman volume rm <volume-name-1> <volume-name-2> <volume-name-3> and so on.

Happy destroying!

Tagged , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *