1podman-container-prune(1)()                        podman-container-prune(1)()
2
3
4

NAME

6       podman-container-prune - Remove all stopped containers from local stor‐
7       age
8
9

SYNOPSIS

11       podman container prune [options]
12
13

DESCRIPTION

15       podman container prune removes all stopped containers from local  stor‐
16       age.
17
18

OPTIONS

20   --filter=filters
21       Provide filter values.
22
23
24       The  --filter  flag format is of “key=value”. If there is more than one
25       filter, then pass multiple flags  (e.g.,  --filter  "foo=bar"  --filter
26       "bif=baz")
27
28
29       Supported filters:
30
31
32              · until  (timestamp) - only remove containers and images created
33                before given timestamp
34
35              · label    (label=key,    label=key=value,    label!=key,     or
36                label!=key=value)  -  only  remove containers and images, with
37                (or without, in case label!=... is used) the specified labels.
38
39
40
41       The until filter can be Unix timestamps, date formatted timestamps,  or
42       Go  duration  strings  (e.g.  10m,  1h30m)  computed  relative  to  the
43       machine’s time.
44
45
46       The label filter accepts two formats. One is the  label=...  (label=key
47       or  label=key=value),  which  removes  containers  with  the  specified
48       labels.  The  other   format   is   the   label!=...   (label!=key   or
49       label!=key=value),  which  removes  containers  without  the  specified
50       labels.
51
52
53   --force, -f
54       Do not provide an interactive prompt for container removal.
55
56
57       -h, --help
58
59
60       Print usage statement
61
62

EXAMPLES

64       Remove all stopped containers from local storage
65
66
67              $ sudo podman container prune
68              WARNING! This will remove all stopped containers.
69              Are you sure you want to continue? [y/N] y
70              878392adf2e6c5c9bb1fc19b69d37d2e98c8abf9d539c0bce4b15b46bbcce471
71              37664467fbe3618bf9479c34393ac29c02696675addf1750f9e346581636cde7
72              ed0c6468b8e1cb641b4621d1fe30cb477e1fefc5c0bceb66feaf2f7cb50e5962
73              6ac6c8f0067b7a4682e6b8e18902665b57d1a0e07e885d9abcd382232a543ccd
74              fff1c5b6c3631746055ec40598ce8ecaa4b82aef122f9e3a85b03b55c0d06c23
75              602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5
76
77
78
79       Remove all stopped containers from local storage without confirmation.
80
81
82              $ sudo podman container prune -f
83              878392adf2e6c5c9bb1fc19b69d37d2e98c8abf9d539c0bce4b15b46bbcce471
84              37664467fbe3618bf9479c34393ac29c02696675addf1750f9e346581636cde7
85              ed0c6468b8e1cb641b4621d1fe30cb477e1fefc5c0bceb66feaf2f7cb50e5962
86              6ac6c8f0067b7a4682e6b8e18902665b57d1a0e07e885d9abcd382232a543ccd
87              fff1c5b6c3631746055ec40598ce8ecaa4b82aef122f9e3a85b03b55c0d06c23
88              602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5
89
90
91
92
93       Remove all stopped containers from local storage created within last 10
94       minutes
95
96
97              $ sudo podman container prune --filter until="10m"
98              WARNING! This will remove all stopped containers.
99              Are you sure you want to continue? [y/N] y
100              3d366295e33d8cc612c4d873199bacadd55088d90d17dcafaa9a2d317ad50b4e
101
102
103

SEE ALSO

105       podman(1), podman-ps
106
107

HISTORY

109       December 2018, Originally compiled by Brent Baude (bbaude at redhat dot
110       com) December 2020, converted filter information  from  docs.docker.com
111       documentation by Dan Walsh (dwalsh at redhat dot com)
112
113
114
115                                                   podman-container-prune(1)()
Impressum