github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/docs/source/markdown/podman-container-prune.1.md (about)

     1  % podman-container-prune(1)
     2  
     3  ## NAME
     4  podman-container-prune - Remove all stopped containers from local storage
     5  
     6  ## SYNOPSIS
     7  **podman container prune** [*options*]
     8  
     9  ## DESCRIPTION
    10  **podman container prune** removes all stopped containers from local storage.
    11  
    12  ## OPTIONS
    13  
    14  **--filter**=*filters*
    15  
    16  Provide filter values.
    17  
    18  **--force**, **-f**
    19  
    20  Do not provide an interactive prompt for container removal.
    21  
    22  **-h**, **--help**
    23  
    24  Print usage statement
    25  
    26  ## Examples
    27  
    28  Remove all stopped containers from local storage
    29  ```
    30  $ sudo podman container prune
    31  WARNING! This will remove all stopped containers.
    32  Are you sure you want to continue? [y/N] y
    33  878392adf2e6c5c9bb1fc19b69d37d2e98c8abf9d539c0bce4b15b46bbcce471
    34  37664467fbe3618bf9479c34393ac29c02696675addf1750f9e346581636cde7
    35  ed0c6468b8e1cb641b4621d1fe30cb477e1fefc5c0bceb66feaf2f7cb50e5962
    36  6ac6c8f0067b7a4682e6b8e18902665b57d1a0e07e885d9abcd382232a543ccd
    37  fff1c5b6c3631746055ec40598ce8ecaa4b82aef122f9e3a85b03b55c0d06c23
    38  602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5
    39  ```
    40  
    41  Remove all stopped containers from local storage without confirmation.
    42  ```
    43  $ sudo podman container prune -f
    44  878392adf2e6c5c9bb1fc19b69d37d2e98c8abf9d539c0bce4b15b46bbcce471
    45  37664467fbe3618bf9479c34393ac29c02696675addf1750f9e346581636cde7
    46  ed0c6468b8e1cb641b4621d1fe30cb477e1fefc5c0bceb66feaf2f7cb50e5962
    47  6ac6c8f0067b7a4682e6b8e18902665b57d1a0e07e885d9abcd382232a543ccd
    48  fff1c5b6c3631746055ec40598ce8ecaa4b82aef122f9e3a85b03b55c0d06c23
    49  602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5
    50  
    51  ```
    52  
    53  Remove all stopped containers from local storage created within last 10 minutes
    54  ```
    55  $ sudo podman container prune --filter until="10m"
    56  WARNING! This will remove all stopped containers.
    57  Are you sure you want to continue? [y/N] y
    58  3d366295e33d8cc612c4d873199bacadd55088d90d17dcafaa9a2d317ad50b4e
    59  ```
    60  
    61  ## SEE ALSO
    62  podman(1), podman-ps
    63  
    64  ## HISTORY
    65  December 2018, Originally compiled by Brent Baude (bbaude at redhat dot com)