# docker rmi: Remove Images & Reclaim Disk

> How docker rmi works: deleting images by name or ID, force removal, untagging, and the conflict errors you hit in CI.

Source: https://latchkey.dev/learn/command-reference/docker-rmi-command  
Updated: 2026-06-25

Remove images to reclaim disk on a runner.

docker rmi (alias docker image rm) removes images. This page covers force removal, the image-in-use conflict, and reclaiming disk in CI.

## What it does

docker rmi deletes one or more images from the local store. If a tag is one of several pointing at the same image ID, rmi untags it rather than deleting the layers.

## Common usage

```Terminal
docker rmi myapp:old
docker rmi -f $(docker images -q)      # remove all images
docker rmi $(docker images -f "dangling=true" -q)
```

## Common errors in CI

"conflict: unable to delete <id> (cannot be forced) - image is being used by running container" - stop and remove the container first (docker rm -f), then rmi. "image is referenced in multiple repositories" - remove by full name:tag rather than ID, or use -f. For broad cleanup in CI, docker image prune -af is usually simpler than rmi loops.

## FAQ

### docker rmi: Remove Images & Reclaim Disk?

docker rmi (alias docker image rm) removes images. This page covers force removal, the image-in-use conflict, and reclaiming disk in CI.

### What it does?

docker rmi deletes one or more images from the local store. If a tag is one of several pointing at the same image ID, rmi untags it rather than deleting the layers.

### Common errors in CI?

"conflict: unable to delete <id> (cannot be forced) - image is being used by running container" - stop and remove the container first (docker rm -f), then rmi. "image is referenced in multiple repositories" - remove by full name:tag rather than ID, 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
