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  un‐
38       available.
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. (This option is not available with the remote Podman client)
53
54
55   --volumes, -v
56       Remove  anonymous  volumes associated with the container. This does not
57       include named volumes created with podman volume create, or the  --vol‐
58       ume option of podman run and podman create.
59
60

EXAMPLE

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

Exit Status

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

SEE ALSO

119       podman(1),  podman-image-rm(1),  podman-ps(1),  podman-build(1),  buil‐
120       dah(1), cri-o(1)
121
122

HISTORY

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