Prune Unused Images from Docker

Snippets

To remove images that are not used by any container, use:

docker image prune --all

Read the confirmation prompt before proceeding. This removes unused images, including tagged images; it does not remove containers or volumes.

Broader cleanup #

docker system prune --all also removes stopped containers, unused networks, and build cache. It does not remove volumes unless requested separately. The screenshot below shows that broader cleanup operation.

Output from Docker system prune

See the Docker image prune and system prune references.