.nh .TH podman\-rm(1) .SH NAME .PP podman\-rm \- Remove one or more containers .SH SYNOPSIS .PP \fBpodman rm\fP [\fIoptions\fP] \fIcontainer\fP .PP \fBpodman container rm\fP [\fIoptions\fP] \fIcontainer\fP .SH DESCRIPTION .PP \fBpodman rm\fP will remove one or more containers from the host. The container name or ID can be used. This does not remove images. Running or unusable containers will not be removed without the \fB\-f\fP option. .SH OPTIONS .SS \fB\-\-all\fP, \fB\-a\fP .PP Remove all containers. Can be used in conjunction with \fB\-f\fP as well. .SS \fB\-\-cidfile\fP .PP Read container ID from the specified file and remove the container. Can be specified multiple times. .SS \fB\-\-force\fP, \fB\-f\fP .PP Force the removal of running and paused containers. Forcing a container removal also removes containers from container storage even if the container is not known to podman. Containers could have been created by a different container engine. In addition, forcing can be used to remove unusable containers, e.g. containers whose OCI runtime has become unavailable. .SS \fB\-\-ignore\fP, \fB\-i\fP .PP Ignore errors when specified containers are not in the container store. A user might have decided to manually remove a container which would lead to a failure during the ExecStop directive of a systemd service referencing that container. .SS \fB\-\-latest\fP, \fB\-l\fP .PP Instead of providing the container name or ID, use the last created container. If you use methods other than Podman to run containers such as CRI\-O, the last started container could be from either of those methods. .PP The latest option is not supported on the remote client. .SS \fB\-\-volumes\fP, \fB\-v\fP .PP Remove anonymous volumes associated with the container. This does not include named volumes created with \fBpodman volume create\fP, or the \fB\-\-volume\fP option of \fBpodman run\fP and \fBpodman create\fP\&. .SH EXAMPLE .PP Remove a container by its name \fImywebserver\fP .PP .RS .nf $ podman rm mywebserver .fi .RE .PP Remove several containers by name and container id. .PP .RS .nf $ podman rm mywebserver myflaskserver 860a4b23 .fi .RE .PP Remove several containers reading their IDs from files. .PP .RS .nf $ podman rm \-\-cidfile ./cidfile\-1 \-\-cidfile /home/user/cidfile\-2 .fi .RE .PP Forcibly remove a container by container ID. .PP .RS .nf $ podman rm \-f 860a4b23 .fi .RE .PP Remove all containers regardless of its run state. .PP .RS .nf $ podman rm \-f \-a .fi .RE .PP Forcibly remove the latest container created. .PP .RS .nf $ podman rm \-f \-\-latest .fi .RE .SH Exit Status .PP \fB0\fP All specified containers removed .PP \fB1\fP One of the specified containers did not exist, and no other failures .PP \fB2\fP One of the specified containers is paused or running .PP \fB125\fP The command fails for any other reason .SH SEE ALSO .PP podman(1), podman\-image\-rm(1), podman\-ps(1), podman\-build(1), buildah(1), cri\-o(1) .SH HISTORY .PP August 2017, Originally compiled by Ryan Cole rycole@redhat.com \[la]mailto:rycole@redhat.com\[ra]