1podman-rm(1)()                                                  podman-rm(1)()
2
3
4

NAME

6       podman-rm - Remove one or more containers
7
8

SYNOPSIS

10       podman rm [options] container
11
12
13       podman container rm [options] container
14
15

DESCRIPTION

17       podman  rm  will remove one or more containers from the host.  The con‐
18       tainer name or ID can be used.  This does not remove  images.   Running
19       or unusable containers will not be removed without the -f option.
20
21

OPTIONS

23   --all, -a
24       Remove all containers.  Can be used in conjunction with -f as well.
25
26
27   --cidfile
28       Read  container  ID  from  the specified file and remove the container.
29       Can be specified multiple times.
30
31
32   --force, -f
33       Force the removal of running and paused containers. Forcing a container
34       removal also removes containers from container storage even if the con‐
35       tainer is not known to podman.  Containers could have been created by a
36       different container engine.  In addition, forcing can be used to remove
37       unusable containers, e.g.  containers  whose  OCI  runtime  has  become
38       unavailable.
39
40
41   --ignore, -i
42       Ignore errors when specified containers are not in the container store.
43       A user might have decided to manually remove a  container  which  would
44       lead  to  a  failure during the ExecStop directive of a systemd service
45       referencing that container.
46
47
48   --latest, -l
49       Instead of providing the container name or ID,  use  the  last  created
50       container.  If you use methods other than Podman to run containers such
51       as CRI-O, the last started container could  be  from  either  of  those
52       methods.
53
54
55       The latest option is not supported on the remote client.
56
57
58   --volumes, -v
59       Remove  anonymous  volumes associated with the container. This does not
60       include named volumes created with podman volume create, or the  --vol‐
61       ume option of podman run and podman create.
62
63

EXAMPLE

65       Remove a container by its name mywebserver
66
67
68              $ podman rm mywebserver
69
70
71
72       Remove several containers by name and container id.
73
74
75              $ podman rm mywebserver myflaskserver 860a4b23
76
77
78
79       Remove several containers reading their IDs from files.
80
81
82              $ podman rm --cidfile ./cidfile-1 --cidfile /home/user/cidfile-2
83
84
85
86       Forcibly remove a container by container ID.
87
88
89              $ podman rm -f 860a4b23
90
91
92
93       Remove all containers regardless of its run state.
94
95
96              $ podman rm -f -a
97
98
99
100       Forcibly remove the latest container created.
101
102
103              $ podman rm -f --latest
104
105
106

Exit Status

108       0   All specified containers removed
109
110
111       1    One  of the specified containers did not exist, and no other fail‐
112       ures
113
114
115       2   One of the specified containers is paused or running
116
117
118       125 The command fails for any other reason
119
120

SEE ALSO

122       podman(1),  podman-image-rm(1),  podman-ps(1),  podman-build(1),  buil‐
123       dah(1), cri-o(1)
124
125

HISTORY

127       August   2017,  Originally  compiled  by  Ryan  Cole  rycole@redhat.com
128       ⟨mailto:rycole@redhat.com⟩
129
130
131
132                                                                podman-rm(1)()
Impressum