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  filters argument format is of key=value. If there is more than one
25       filter, then pass multiple OPTIONS: --filter foo=bar --filter bif=baz.
26
27
28       Supported filters:
29
30
31       ┌───────┬────────────────────────────┐
32Filter Description                
33       ├───────┼────────────────────────────┤
34label  │ Only  remove   containers, │
35       │       │ with  (or  without, in the │
36       │       │ case  of  label!=[...]  is │
37       │       │ used)  the  specified  la‐ │
38       │       │ bels.                      │
39       ├───────┼────────────────────────────┤
40until  │ Only   remove   containers │
41       │       │ created before given time‐ │
42       │       │ stamp.                     │
43       └───────┴────────────────────────────┘
44
45       The label filter accepts two formats.  One  is  the  label=key  or  la‐
46       bel=key=value,  which removes containers with the specified labels. The
47       other format is the label!=key or label!=key=value, which removes  con‐
48       tainers without the specified labels.
49
50
51       The  until filter can be Unix timestamps, date formatted timestamps, or
52       Go duration strings (e.g. 10m, 1h30m)  computed  relative  to  the  ma‐
53       chine’s time.
54
55
56   --force, -f
57       Do not provide an interactive prompt for container removal.
58       The default is false.
59
60
61       -h, --help
62
63
64       Print usage statement.
65       The default is false.
66
67

EXAMPLES

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

SEE ALSO

109       podman(1), podman-ps(1)
110
111

HISTORY

113       December 2018, Originally compiled  by  Brent  Baude  bbaude@redhat.com
114       ⟨mailto:bbaude@redhat.com⟩
115       December  2020, converted filter information from docs.docker.com docu‐
116       mentation by Dan Walsh dwalsh@redhat.com ⟨mailto:dwalsh@redhat.com⟩
117
118
119
120                                                   podman-container-prune(1)()
Impressum