1podman-rm(1)() podman-rm(1)()
2
3
4
6 podman-rm - Remove one or more containers
7
8
10 podman rm [options] container
11
12
13 podman container rm [options] container
14
15
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
23 --all, -a
24
25
26 Remove all containers. Can be used in conjunction with -f as well.
27
28
29 --force, -f
30
31
32 Force the removal of running and paused containers. Forcing a container
33 removal also removes containers from container storage even if the con‐
34 tainer is not known to podman. Containers could have been created by a
35 different container engine. In addition, forcing can be used to remove
36 unusable containers, e.g. containers whose OCI runtime has become
37 unavailable.
38
39
40 --latest, -l
41
42
43 Instead of providing the container name or ID, use the last created
44 container. If you use methods other than Podman to run containers such
45 as CRI-O, the last started container could be from either of those
46 methods.
47
48
49 The latest option is not supported on the remote client.
50
51
52 --storage
53
54
55 Remove the container from the storage library only. This is only pos‐
56 sible with containers that are not present in libpod (cannot be seen by
57 podman ps). It is used to remove containers from podman build and
58 buildah, and orphan containers which were only partially removed by
59 podman rm. The storage option conflicts with the --all, --latest, and
60 --volumes options.
61
62
63 --volumes, -v
64
65
66 Remove the volumes associated with the container.
67
68
70 Remove a container by its name mywebserver
71
72
73 podman rm mywebserver
74
75
76
77 Remove several containers by name and container id.
78
79
80 podman rm mywebserver myflaskserver 860a4b23
81
82
83
84 Forcibly remove a container by container ID.
85
86
87 podman rm -f 860a4b23
88
89
90
91 Remove all containers regardless of its run state.
92
93
94 podman rm -f -a
95
96
97
98 Forcibly remove the latest container created.
99
100
101 podman rm -f --latest
102
103
104
106 0 if all specified containers removed 1 if one of the specified con‐
107 tainers did not exist, and no other failures 2 if one of the specified
108 containers is paused or running 125 if the command fails for a reason
109 other than container did not exist or is paused/running
110
111
113 podman(1), podman-image-rm(1)
114
115
117 August 2017, Originally compiled by Ryan Cole rycole@redhat.com
118 ⟨mailto:rycole@redhat.com⟩
119
120
121
122 podman-rm(1)()