github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-pod-rm.1.md (about)

     1  % podman-pod-rm(1)
     2  
     3  ## NAME
     4  podman\-pod\-rm - Remove one or more stopped pods and containers
     5  
     6  ## SYNOPSIS
     7  **podman pod rm** [*options*] *pod*
     8  
     9  ## DESCRIPTION
    10  **podman pod rm** will remove one or more stopped pods and their containers from the host.  The pod name or ID can be used. The \-f option stops all containers and then removes them before removing the pod. If all containers added by the user are in an exited state, the pod will be removed.
    11  
    12  ## OPTIONS
    13  
    14  #### **--all**, **-a**
    15  
    16  Remove all pods.  Can be used in conjunction with \-f as well.
    17  
    18  #### **--force**, **-f**
    19  
    20  Stop running containers and delete all stopped containers before removal of pod.
    21  
    22  #### **--ignore**, **-i**
    23  
    24  Ignore errors when specified pods are not in the container store.  A user might
    25  have decided to manually remove a pod which would lead to a failure during the
    26  ExecStop directive of a systemd service referencing that pod.
    27  
    28  #### **--latest**, **-l**
    29  
    30  Instead of providing the pod name or ID, remove the last created pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
    31  
    32  #### **--pod-id-file**
    33  
    34  Read pod ID from the specified file and remove the pod.  Can be specified multiple times.
    35  
    36  #### **--time**, **-t**=*seconds*
    37  
    38  Seconds to wait before forcibly stopping running containers within the pod. The --force option must be specified to use the --time option.
    39  
    40  ## EXAMPLE
    41  
    42  Remove pod with a given name
    43  ```
    44  podman pod rm mywebserverpod
    45  ```
    46  
    47  Remove multiple pods with given names and/or IDs
    48  ```
    49  podman pod rm mywebserverpod myflaskserverpod 860a4b23
    50  ```
    51  
    52  Forcefully remove pod with a given ID
    53  ```
    54  podman pod rm -f 860a4b23
    55  ```
    56  
    57  Forcefully remove all pods
    58  ```
    59  podman pod rm -f -a
    60  podman pod rm -fa
    61  ```
    62  
    63  Remove pod using ID specified in a given file
    64  ```
    65  podman pod rm --pod-id-file /path/to/id/file
    66  ```
    67  
    68  ## Exit Status
    69    **0**   All specified pods removed
    70  
    71    **1**   One of the specified pods did not exist, and no other failures
    72  
    73    **2**   One of the specified pods is attached to a container
    74  
    75    **125** The command fails for any other reason
    76  
    77  ## SEE ALSO
    78  **[podman(1)](podman.1.md)**, **[podman-pod(1)](podman-pod.1.md)**
    79  
    80  ## HISTORY
    81  July 2018, Originally compiled by Peter Hunt <pehunt@redhat.com>