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   --depend
33       Remove selected container and recursively remove  all  containers  that
34       depend on it.
35
36
37   --force, -f
38       Force the removal of running and paused containers. Forcing a container
39       removal also removes containers from container storage even if the con‐
40       tainer is not known to podman.  Containers could have been created by a
41       different container engine.  In addition, forcing can be used to remove
42       unusable  containers,  e.g. containers whose OCI runtime has become un‐
43       available.
44
45
46   --ignore, -i
47       Ignore errors when specified containers are not in the container store.
48       A  user  might  have decided to manually remove a container which would
49       lead to a failure during the ExecStop directive of  a  systemd  service
50       referencing that container.
51
52
53   --latest, -l
54       Instead  of  providing  the  container name or ID, use the last created
55       container. If you use methods other than Podman to run containers  such
56       as  CRI-O,  the  last  started  container could be from either of those
57       methods. (This option is not available with the remote  Podman  client,
58       including Mac and Windows (excluding WSL2) machines)
59
60
61   --time, -t=seconds
62       Seconds to wait before forcibly stopping the container. The --force op‐
63       tion must be specified to use the --time option.
64
65
66   --volumes, -v
67       Remove anonymous volumes associated with the container. This  does  not
68       include  named volumes created with podman volume create, or the --vol‐
69       ume option of podman run and podman create.
70
71

EXAMPLE

73       Remove a container by its name mywebserver
74
75
76              $ podman rm mywebserver
77
78
79
80       Remove a mywebserver container and all of the containers that depend on
81       it
82
83
84              $ podman rm --depend mywebserver
85
86
87
88       Remove several containers by name and container id.
89
90
91              $ podman rm mywebserver myflaskserver 860a4b23
92
93
94
95       Remove several containers reading their IDs from files.
96
97
98              $ podman rm --cidfile ./cidfile-1 --cidfile /home/user/cidfile-2
99
100
101
102       Forcibly remove a container by container ID.
103
104
105              $ podman rm -f 860a4b23
106
107
108
109       Remove all containers regardless of its run state.
110
111
112              $ podman rm -f -a
113
114
115
116       Forcibly remove the latest container created.
117
118
119              $ podman rm -f --latest
120
121
122

Exit Status

124       0   All specified containers removed
125
126
127       1    One  of the specified containers did not exist, and no other fail‐
128       ures
129
130
131       2   One of the specified containers is paused or running
132
133
134       125 The command fails for any other reason
135
136

SEE ALSO

138       podman(1), crio(8)
139
140

HISTORY

142       August  2017,  Originally  compiled  by  Ryan  Cole   rycole@redhat.com
143       ⟨mailto:rycole@redhat.com⟩
144
145
146
147                                                                podman-rm(1)()
Impressum