'\" t .nh .TH podman-system-prune 1 .SH NAME .PP podman-system-prune - Remove all unused pods, containers, images, networks, and volume data .SH SYNOPSIS .PP \fBpodman system prune\fP [\fIoptions\fP] .SH DESCRIPTION .PP \fBpodman system prune\fP removes all unused containers (both dangling and unreferenced), pods, networks, and optionally, volumes from local storage. .PP Use the \fB--all\fP option to delete all unused images. Unused images are dangling images as well as any image that does not have any containers based on it. .PP By default, volumes are not removed to prevent important data from being deleted if there is currently no container using the volume. Use the \fB--volumes\fP flag when running the command to prune volumes as well. .SH OPTIONS .SS \fB--all\fP, \fB-a\fP .PP Recursively remove all unused pods, containers, images, networks, and volume data. (Maximum 50 iterations.) .SS \fB--external\fP .PP Removes all leftover container storage files from local storage not managed by Podman. In normal circumstances, no such data exists, but in case of an unclean shutdown, the Podman database may be corrupted and cause this. .PP However, when using transient storage mode, the Podman database does not persist. This means containers leave the writable layers on disk after a reboot. When using a transient store, it is recommended that the \fBpodman system prune --external\fP command is run during boot. .PP This option is incompatible with \fB--all\fP and \fB--filter\fP and drops the default behaviour of removing unused resources. .SS \fB--filter\fP=\fIfilters\fP .PP Provide filter values. .PP The \fIfilters\fP argument format is of \fBkey=value\fR\&. If there is more than one \fIfilter\fP, then pass multiple OPTIONS: \fB--filter\fP \fIfoo=bar\fP \fB--filter\fP \fIbif=baz\fP\&. .PP Supported filters: .TS allbox; l l l l . \fBFilter\fP \fBDescription\fP label T{ Only remove containers and images, with (or without, in the case of label!=[...] is used) the specified labels. T} until T{ Only remove containers and images created before given timestamp. T} .TE .PP The \fBlabel\fR \fIfilter\fP accepts two formats. One is the \fBlabel\fR=\fIkey\fP or \fBlabel\fR=\fIkey\fP=\fIvalue\fP, which removes containers and images with the specified labels. The other format is the \fBlabel!\fR=\fIkey\fP or \fBlabel!\fR=\fIkey\fP=\fIvalue\fP, which removes containers and images without the specified labels. .PP The \fBuntil\fR \fIfilter\fP can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the machine’s time. .SS \fB--force\fP, \fB-f\fP .PP Do not prompt for confirmation .SS \fB--help\fP, \fB-h\fP .PP Print usage statement .SS \fB--volumes\fP .PP Prune volumes currently unused by any container .SH SEE ALSO .PP \fBpodman(1)\fP, \fBpodman-system(1)\fP .SH HISTORY .PP February 2019, Originally compiled by Dan Walsh (dwalsh at redhat dot com) December 2020, converted filter information from docs.docker.com documentation by Dan Walsh (dwalsh at redhat dot com)