aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-03-17 14:51:54 +0100
committerValentin Rothberg <vrothberg@redhat.com>2022-03-19 10:05:43 +0100
commit95dad4d8a443682e59c14a94035a111bab3e42fc (patch)
tree33ca2ad0601038d36ee0c687367155450e2a1b56 /docs
parentc2eae35c606382418c6e2ce57c4ab874f1975f21 (diff)
downloadpodman-95dad4d8a443682e59c14a94035a111bab3e42fc.tar.gz
podman-95dad4d8a443682e59c14a94035a111bab3e42fc.tar.bz2
podman-95dad4d8a443682e59c14a94035a111bab3e42fc.zip
podman rmi --ignore
Add an `--ignore` flag to `podman image rm` to instruct ignoring image if a specified image does not exist and to not throw an error. Other commands (e.g., `podman container rm`) already support this flag. Such an `--ignore` flag can come in handy in clean-up scripcts such as the teardown phases in the Podman tests. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/source/markdown/podman-rmi.1.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/source/markdown/podman-rmi.1.md b/docs/source/markdown/podman-rmi.1.md
index 5fe0efa18..8d0e5e500 100644
--- a/docs/source/markdown/podman-rmi.1.md
+++ b/docs/source/markdown/podman-rmi.1.md
@@ -24,6 +24,10 @@ Remove all images in the local storage.
This option will cause podman to remove all containers that are using the image before removing the image from the system.
+#### **--ignore**, **-i**
+
+If a specified image does not exist in the local storage, ignore it and do not throw an error.
+
Remove an image by its short ID
```
@@ -43,6 +47,16 @@ Remove all images and containers.
```
$ podman rmi -a -f
```
+
+Remove an absent image with and without the `--ignore` flag.
+```
+$ podman rmi --ignore nothing
+$ podman rmi nothing
+Error: nothing: image not known
+
+```
+
+
## Exit Status
**0** All specified images removed