Docker is now an essential tool for software developers, as it allows you to spin up almost any infrastructure you may need.

Ordinarily, you would use a utility to manage your containers and images. This may be Docker Desktop or, if you are on macOS, Orbstack.

Images can be in one of three states:

  1. In use - currently in active use for a running container
  2. Unused - downloaded to your local cache but not in use
  3. Dangling - a newer version of the image has been downloaded

dockerImageState

The dangling images are listed further down:

dockerDangling

You can also get this information via the command line.

The docker images command lists all the images.

docker images

This returns a list like this:

dockerImgaes

To get a list of the dangling images, pass a filter, like this:

docker images -f "dangling=true"

dockerDanglingList

TLDR

To list dangling Docker images, use the command docker images -f "dangling=true"

Happy hacking!