102 lines
3.1 KiB
Groff
102 lines
3.1 KiB
Groff
'\" t
|
||
.nh
|
||
.TH podman-container-prune 1
|
||
.SH NAME
|
||
podman-container-prune \- Remove all stopped containers from local storage
|
||
|
||
.SH SYNOPSIS
|
||
\fBpodman container prune\fP [\fIoptions\fP]
|
||
|
||
.SH DESCRIPTION
|
||
\fBpodman container prune\fP removes all stopped containers from local storage.
|
||
|
||
.SH OPTIONS
|
||
.SS \fB--filter\fP=\fIfilters\fP
|
||
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, with (or without, in the case of label!=[...] is used) the specified labels.
|
||
T}
|
||
until T{
|
||
Only remove containers 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 with the specified labels. The other format is the \fBlabel!\fR=\fIkey\fP or \fBlabel!\fR=\fIkey\fP=\fIvalue\fP, which removes containers 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
|
||
Do not provide an interactive prompt for container removal.
|
||
.br
|
||
The default is \fBfalse\fP\&.
|
||
|
||
.PP
|
||
\fB-h\fP, \fB--help\fP
|
||
|
||
.PP
|
||
Print usage statement.
|
||
.br
|
||
The default is \fBfalse\fP\&.
|
||
|
||
.SH EXAMPLES
|
||
Remove all stopped containers from local storage:
|
||
|
||
.EX
|
||
$ podman container prune
|
||
WARNING! This will remove all stopped containers.
|
||
Are you sure you want to continue? [y/N] y
|
||
878392adf2e6c5c9bb1fc19b69d37d2e98c8abf9d539c0bce4b15b46bbcce471
|
||
37664467fbe3618bf9479c34393ac29c02696675addf1750f9e346581636cde7
|
||
ed0c6468b8e1cb641b4621d1fe30cb477e1fefc5c0bceb66feaf2f7cb50e5962
|
||
6ac6c8f0067b7a4682e6b8e18902665b57d1a0e07e885d9abcd382232a543ccd
|
||
fff1c5b6c3631746055ec40598ce8ecaa4b82aef122f9e3a85b03b55c0d06c23
|
||
602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5
|
||
.EE
|
||
|
||
.PP
|
||
Remove all stopped containers from local storage without confirmation:
|
||
|
||
.EX
|
||
$ podman container prune -f
|
||
878392adf2e6c5c9bb1fc19b69d37d2e98c8abf9d539c0bce4b15b46bbcce471
|
||
37664467fbe3618bf9479c34393ac29c02696675addf1750f9e346581636cde7
|
||
ed0c6468b8e1cb641b4621d1fe30cb477e1fefc5c0bceb66feaf2f7cb50e5962
|
||
6ac6c8f0067b7a4682e6b8e18902665b57d1a0e07e885d9abcd382232a543ccd
|
||
fff1c5b6c3631746055ec40598ce8ecaa4b82aef122f9e3a85b03b55c0d06c23
|
||
602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5
|
||
.EE
|
||
|
||
.PP
|
||
Remove all stopped containers from local storage created before the last 10 minutes:
|
||
|
||
.EX
|
||
$ podman container prune --filter until="10m"
|
||
WARNING! This will remove all stopped containers.
|
||
Are you sure you want to continue? [y/N] y
|
||
3d366295e33d8cc612c4d873199bacadd55088d90d17dcafaa9a2d317ad50b4e
|
||
.EE
|
||
|
||
.SH SEE ALSO
|
||
\fBpodman(1)\fP, \fBpodman-ps(1)\fP
|
||
|
||
.SH HISTORY
|
||
December 2018, Originally compiled by Brent Baude bbaude@redhat.com
|
||
\[la]mailto:bbaude@redhat.com\[ra]
|
||
.br
|
||
December 2020, converted filter information from docs.docker.com documentation by Dan Walsh dwalsh@redhat.com
|
||
\[la]mailto:dwalsh@redhat.com\[ra]
|