Prune dangling and unused images
To remove dangling or unused images from an environment, navigate to Images in your environment menu and click Prune from the Images list.

You can identify dangling images by the dangling tag, and unused images by the unused label displayed next to the image ID.

On selecting Prune, Portainer will by default delete all untagged (dangling) images, equivalent to running docker image prune. To also remove tagged images that are not in use by any container, select Delete all unused images in the confirmation dialog - this is the equivalent to running docker image prune -a. To also remove cached build layers that are no longer in use, select Clear Docker build cache.

Press Continue to complete the prune. On success, a confirmation dialog will show how much disk space was reclaimed.
If a prune operation reports 0B reclaimed, this is likely because the image layers are still referenced by existing images, or are being retained in the Docker build cache. Select Clear Docker build cache to address this. See this Docker forum discussion for more detail on this behaviour.
Last updated
Was this helpful?