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

NAME

6       podman-image-prune - Remove all unused images from the local store
7
8

SYNOPSIS

10       podman image prune [options]
11
12

DESCRIPTION

14       podman image prune removes all dangling images from local storage. With
15       the all option, you can delete all unused images.   Unused  images  are
16       dangling  images as well as any image that does not have any containers
17       based on it.
18
19
20       The image prune command does not prune cache images that only use  lay‐
21       ers that are necessary for other images.
22
23

OPTIONS

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

EXAMPLES

70       Remove all dangling images from local storage
71
72
73              $ sudo podman image prune
74
75              WARNING! This will remove all dangling images.
76              Are you sure you want to continue? [y/N] y
77              f3e20dc537fb04cb51672a5cb6fdf2292e61d411315549391a0d1f64e4e3097e
78              324a7a3b2e0135f4226ffdd473e4099fd9e477a74230cdc35de69e84c0f9d907
79
80
81
82       Remove all unused images from local storage without confirming
83
84
85              $ sudo podman image prune -a -f
86              f3e20dc537fb04cb51672a5cb6fdf2292e61d411315549391a0d1f64e4e3097e
87              324a7a3b2e0135f4226ffdd473e4099fd9e477a74230cdc35de69e84c0f9d907
88              6125002719feb1ddf3030acab1df6156da7ce0e78e571e9b6e9c250424d6220c
89              91e732da5657264c6f4641b8d0c4001c218ae6c1adb9dcef33ad00cafd37d8b6
90              e4e5109420323221f170627c138817770fb64832da7d8fe2babd863148287fca
91              77a57fa8285e9656dbb7b23d9efa837a106957409ddd702f995605af27a45ebe
92
93
94
95
96       Remove all unused images from local storage since given time/hours.
97
98
99              $ sudo podman image prune -a --filter until=2019-11-14T06:15:42.937792374Z
100
101              WARNING! This will remove all dangling images.
102              Are you sure you want to continue? [y/N] y
103              e813d2135f17fadeffeea8159a34cfdd4c30b98d8111364b913a91fd930643e9
104              5e6572320437022e2746467ddf5b3561bf06e099e8e6361df27e0b2a7ed0b17b
105              58fda2abf5042b35dfe04e5f8ee458a3cc26375bf309efb42c078b551a2055c7
106              6d2bd30fe924d3414b64bd3920760617e6ced872364bc3bc6959a623252da002
107              33d1c829be64a1e1d379caf4feec1f05a892c3ef7aa82c0be53d3c08a96c59c5
108              f9f0a8a58c9e02a2b3250b88cc5c95b1e10245ca2c4161d19376580aaa90f55c
109              1ef14d5ede80db78978b25ad677fd3e897a578c3af614e1fda608d40c8809707
110              45e1482040e441a521953a6da2eca9bafc769e15667a07c23720d6e0cafc3ab2
111
112              $ sudo podman image prune -f --filter until=10h
113              f3e20dc537fb04cb51672a5cb6fdf2292e61d411315549391a0d1f64e4e3097e
114              324a7a3b2e0135f4226ffdd473e4099fd9e477a74230cdc35de69e84c0f9d907
115
116
117
118       Remove all unused images from local storage with label version 1.0
119
120
121              $ sudo podman image prune -a -f --filter label=version=1.0
122              e813d2135f17fadeffeea8159a34cfdd4c30b98d8111364b913a91fd930643e9
123              5e6572320437022e2746467ddf5b3561bf06e099e8e6361df27e0b2a7ed0b17b
124              58fda2abf5042b35dfe04e5f8ee458a3cc26375bf309efb42c078b551a2055c7
125              6d2bd30fe924d3414b64bd3920760617e6ced872364bc3bc6959a623252da002
126              33d1c829be64a1e1d379caf4feec1f05a892c3ef7aa82c0be53d3c08a96c59c5
127              f9f0a8a58c9e02a2b3250b88cc5c95b1e10245ca2c4161d19376580aaa90f55c
128              1ef14d5ede80db78978b25ad677fd3e897a578c3af614e1fda608d40c8809707
129              45e1482040e441a521953a6da2eca9bafc769e15667a07c23720d6e0cafc3ab2
130
131
132
133

SEE ALSO

135       podman(1), podman-images
136
137

HISTORY

139       December 2018, Originally compiled by Brent Baude (bbaude at redhat dot
140       com) December 2020, converted filter information  from  docs.docker.com
141       documentation by Dan Walsh (dwalsh at redhat dot com)
142
143
144
145                                                       podman-image-prune(1)()
Impressum