List the Images on a Host
Both forms do the same thing; docker image ls is the newer name of the command:
docker images
docker image lsEach line is one name and tag stored on this Docker host. Docker Engine 29 and later print a newer, grouped view by default, with different column names. The classic table, which older releases print and which you can rebuild with --format, has five columns:
| Column | Meaning |
|---|---|
| REPOSITORY | The image name |
| TAG | The version label |
| IMAGE ID | Short content ID |
| CREATED | When it was built, not pulled |
| SIZE | Space it needs, shared layers included |
Two tags that point to the same build show the same IMAGE ID: they are one image with two names. The options below work in both views. How an image differs from the containers made from it is explained in Docker image vs container.
Show Only Some Images
Name a repository to list all of its tags, or use a filter:
docker images nginx
docker images --filter "reference=registry.example.com/shop/*"
docker images --filter "dangling=true"| Filter | Shows |
|---|---|
dangling= | Images without a name |
reference= | Names that match |
before= | Older images |
since= | Newer images |
label= | Images with a label |
Images Shown Without a Name
A line with <none> as both REPOSITORY and TAG is a dangling image. It appears when a name moves to a newer build: you pull nginx:alpine again or rebuild myapp:latest, the name goes to the new image, and the old one stays behind without a name. Since Docker Engine 29, the default listing hides untagged images; add -a to see them. Dangling images that no container uses can go:
docker image pruneWith -a, docker images also lists intermediate images, also shown as <none>: on hosts that built images with the classic builder, the parent layers of those builds. They go with the image they belong to. BuildKit, the default builder today, keeps build steps in its build cache instead.
IDs, Digests, and Custom Output
docker images -q
docker images --digests nginx
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}"
docker images --format "{{.Repository}}:{{.Tag}}"-q: prints only image IDs, one per line, for use in other commands.--digests: adds a DIGEST column, the sha256 hash of the image manifest. A tag can be moved to another build; a digest cannot. See docker tag.--format: takes a Go template. Thetableprefix keeps the header line. Other fields include{{.ID}},{{.CreatedSince}}, and{{.Digest}}.
Size and Shared Layers
Adding up the SIZE column overstates disk use. Images are built from layers, and images that start from the same base share those layers on disk: ten images based on debian:13 store the Debian layer once. For the real figures:
docker system df
docker system df -vThe first command sums images, containers, local volumes, and build cache, with a RECLAIMABLE column. The -v form lists every image with its shared and unique size. If the disk itself is filling up, start with how to check disk space in Linux.
See How an Image Was Built
docker history nginx:alpine
docker image inspect nginx:alpinedocker history lists the layers from newest to oldest, with the instruction that created each one and its size. docker image inspect prints the full metadata as JSON: environment variables, the default command, exposed ports, labels, and the CPU architecture.
Remove Images You No Longer Need
docker rmi myapp:old
docker image prune
docker image prune -adocker rmi: removes one name. If other tags point to the same image, only that tag goes. Docker refuses to delete an image that a container uses, even a stopped one; remove the container first rather than forcing it with-f.docker image prune: removes dangling images only.docker image prune -a: removes every image that no container uses. The next start of a removed service has to pull or build it again.
More examples are in how to remove Docker images, and cleaning images, containers, networks, and build cache in one step is covered in docker system prune.
An Image You Expect Is Missing
Images belong to a Docker daemon, not to a user. If docker images and sudo docker images show different lists, you are talking to two daemons: usually a rootless Docker setup next to the system one. docker context ls marks the context the client uses with an asterisk, and the DOCKER_ variable overrides it when set. Podman keeps its own separate image store as well; see Podman vs Docker.
Updated:
Linux VPS with Full Root Access
MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.
More Guides
No Limits on Service or Support
You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

- 100% customer satisfaction goal
- Our own hardware
- 24/7 ticket and email support
- 4 countries with locations