1podman-container-rm(1)      General Commands Manual     podman-container-rm(1)
2
3
4

NAME

6       podman-container-rm (podman-rm) - Remove one or more containers
7
8

SYNOPSIS

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

DESCRIPTION

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

OPTIONS

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
33       containers removal also removes containers from container storage even
34       if the container is not known to podman.  Containers could have been
35       created by a different container engine.
36
37
38       --latest, -l
39
40
41       Instead of providing the container name or ID, use the last created
42       container. If you use methods other than Podman to run containers such
43       as CRI-O, the last started container could be from either of those
44       methods.
45
46
47       The latest option is not supported on the remote client.
48
49
50       --volumes, -v
51
52
53       Remove the volumes associated with the container.
54
55

EXAMPLE

57       Remove a container by its name mywebserver
58
59
60              podman rm mywebserver
61
62
63
64       Remove several containers by name and container id.
65
66
67              podman rm mywebserver myflaskserver 860a4b23
68
69
70
71       Forcibly remove a container by container ID.
72
73
74              podman rm -f 860a4b23
75
76
77
78       Remove all containers regardless of its run state.
79
80
81              podman rm -f -a
82
83
84
85       Forcibly remove the latest container created.
86
87
88              podman rm -f --latest
89
90
91

Exit Status

93       0 if all specified containers removed 1 if one of the specified
94       containers did not exist, and no other failures 125 if command fails
95       for a reason other then an container did not exist
96
97

SEE ALSO

99       podman(1), podman-image-rm(1)
100
101

HISTORY

103       August 2017, Originally compiled by Ryan Cole ⟨rycole@redhat.com⟩
104
105
106
107                                                        podman-container-rm(1)
Impressum