Docker Cheat Sheet/Prune dangling images

Remove dangling images.

Section: Images

Prune dangling images

bash
bash
docker image prune
Explanation

Reclaims space from untagged layers left after rebuilds.

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
Prune unused images
Remove all unused images.
OpenIn sheetbashsame section
Remove an image
Delete a local image.
OpenIn sheetbashsame section
Force remove an image
Force-remove a local image.
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