# podman rmi: Remove Images and Reclaim Space

> podman rmi deletes images from local storage. Reference for -f, -a, --ignore, and the image-in-use and dependent-child errors in CI.

Source: https://latchkey.dev/learn/command-reference/podman-rmi  
Updated: 2026-06-30

podman rmi removes images from local storage to reclaim disk space on the runner.

Runners fill up fast with build layers. podman rmi clears images you no longer need; pair it with --filter dangling to sweep untagged leftovers.

## What it does

podman rmi (alias podman image rm) deletes one or more images from local storage. An image cannot be removed while a container uses it unless you force it; -f removes the image and untags it from any dependents.

## Common usage

```Terminal
podman rmi ghcr.io/owner/app:old
podman rmi -f 9c1b6dd
podman rmi $(podman images --filter dangling=true -q)
podman rmi -a   # remove all images
```

## Options

| Flag | What it does |
| --- | --- |
| -f, --force | Remove even if containers reference the image |
| -a, --all | Remove all images |
| -i, --ignore | Ignore images that do not exist |

## In CI

Sweep dangling images with podman rmi $(podman images --filter dangling=true -q) to recover space between steps, or use podman image prune for the same effect. Use -f only when you know no running container needs the image.

## Common errors in CI

"Error: image used by ... : image is in use by a container" means a container references it; remove the container first or add -f. "Error: unable to delete ... (must force) - image is referred to in multiple repositories" means several tags point at it; rmi each tag or use -f. An rmi over an ID that has child images may report it is being used; remove dependents first.

## FAQ

### podman rmi: Remove Images and Reclaim Space?

Runners fill up fast with build layers. podman rmi clears images you no longer need; pair it with --filter dangling to sweep untagged leftovers.

### What it does?

podman rmi (alias podman image rm) deletes one or more images from local storage. An image cannot be removed while a container uses it unless you force it; -f removes the image and untags it from any dependents.

### In CI?

Sweep dangling images with podman rmi $(podman images --filter dangling=true -q) to recover space between steps, or use podman image prune for the same effect. Use -f only when you know no running container needs the image.

### Common errors in CI?

"Error: image used by ... : image is in use by a container" means a container references it; remove the container first or add -f. "Error: unable to delete ... (must force) - image is referred to in multiple repositories" means several tags point at it; rmi each tag or use -f.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
