Docker Cheat Sheet/Force remove an image

Force-remove a local image.

Section: Images

Force remove an image

bash
bash
docker rmi -f nginx:latest
Explanation

Useful when tags or stopped containers keep the image referenced.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Images
Remove an image
Delete a local image.
OpenIn sheetbashsame section
Prune dangling images
Remove dangling images.
OpenIn sheetbashsame section
Prune unused images
Remove all unused images.
OpenIn sheetbashsame section
Pull an image
Download an image from a registry.
OpenIn sheetbashsame section
Push an image
Upload an image to a registry.
OpenIn sheetbashsame section
List images
List local images.
OpenIn sheetbashsame section