A dangling image is an untagged and unused Docker image, typically showing as "<none>:<none>" in image listings, that consumes disk space without serving any purpose.
A dangling image is a Docker image that no longer has a tag and is not referenced by any container. In Docker's terminology, these are images that have become "untagged" and "unused"—they exist on your system but are not connected to anything meaningful, similar to dangling pointers in programming. When you list Docker images, dangling images appear with <none> for both the repository name and tag . These images accumulate over time, especially during active development, and waste disk space without providing any benefit.
Dangling images are created in specific scenarios, most commonly when rebuilding an image with the same tag. For example, if you build an image tagged "my-app:latest", then make changes and rebuild with the same tag, Docker reassigns the "my-app:latest" tag to the new image. The previous image becomes untagged—it still exists on disk but now has no tag pointing to it, making it a dangling image . The same happens when pulling an updated version of an image you already have locally.
Dangling images are identified by <none>:<none> in repository and tag fields .
They are created when a new build or pull reassigns a tag from an existing image to a new one .
They are not the same as "intermediate layers," which are intentionally cached to speed up builds .
Dangling images are safe to remove as they aren't needed for any running container .
The docker image prune command is specifically designed to clean up dangling images .
To clean up dangling images, Docker provides the docker image prune command. By default, this removes only dangling images while preserving tagged images and those used by containers . For more aggressive cleanup, docker image prune -a removes all unused images—both dangling images and any tagged images not associated with a container . The docker system prune command offers a comprehensive cleanup, removing dangling images, stopped containers, unused networks, and build cache all at once . Regular pruning helps maintain disk space and keeps your Docker environment healthy .