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

     1  % podman-rmi(1)
     2  
     3  ## NAME
     4  podman\-rmi - Removes one or more locally stored images
     5  
     6  ## SYNOPSIS
     7  **podman rmi** [*options*] *image* [...]
     8  
     9  **podman image rm** [*options*] *image* [...]
    10  
    11  ## DESCRIPTION
    12  Removes one or more locally stored images.
    13  Passing an argument _image_ deletes it, along with any of its dangling parent images.  A dangling image is an image without a tag and without being referenced by another image.
    14  
    15  Note: To delete an image from a remote registry, use the [**skopeo delete**](https://github.com/containers/skopeo/blob/main/docs/skopeo-delete.1.md) command. Some registries do not allow users to delete an image via a CLI remotely.
    16  
    17  ## OPTIONS
    18  
    19  #### **--all**, **-a**
    20  
    21  Remove all images in the local storage.
    22  
    23  #### **--force**, **-f**
    24  
    25  This option will cause podman to remove all containers that are using the image before removing the image from the system.
    26  
    27  #### **--ignore**, **-i**
    28  
    29  If a specified image does not exist in the local storage, ignore it and do not throw an error.
    30  
    31  
    32  Remove an image by its short ID
    33  ```
    34  $ podman rmi c0ed59d05ff7
    35  ```
    36  Remove an image and its associated containers.
    37  ```
    38  $ podman rmi --force imageID
    39  ```
    40  
    41  Remove multiple images by their shortened IDs.
    42  ```
    43  $ podman rmi c4dfb1609ee2 93fd78260bd1 c0ed59d05ff7
    44  ```
    45  
    46  Remove all images and containers.
    47  ```
    48  $ podman rmi -a -f
    49  ```
    50  
    51  Remove an absent image with and without the `--ignore` flag.
    52  ```
    53  $ podman rmi --ignore nothing
    54  $ podman rmi nothing
    55  Error: nothing: image not known
    56  
    57  ```
    58  
    59  
    60  ## Exit Status
    61    **0**   All specified images removed
    62  
    63    **1**   One of the specified images did not exist, and no other failures
    64  
    65    **2**   One of the specified images has child images or is being used by a container
    66  
    67    **125** The command fails for any other reason
    68  
    69  ## SEE ALSO
    70  **[podman(1)](podman.1.md)**, **[skopeo-delete(1)](https://github.com/containers/skopeo/blob/main/docs/skopeo-delete.1.md)**
    71  
    72  ## HISTORY
    73  March 2017, Originally compiled by Dan Walsh <dwalsh@redhat.com>