You are currently viewing [SOLVED] Docker: How To Delete Images Tagged none – 1 Cool Tip?
Could You Please Share This Post? I Appreciate It And Thank YOU! :) Have A Nice Day!

When we often rebuild the application image, which is marked with the same tag, e.g. latest [ How to delete images tagged none ] , we encounter the problem that our image registry (registry) will have many images that will be marked as .

The problem we encounter then is a troublesome registry cleaner from this rubbish. Removing them one by one can give us a lot of nerves and we will lose a lot of time (it is such a “stupid” job). The best will be to have option like: docker rmi none, but it’s not exists in docker CLI.

Delete one by one -> How to delete images tagged none

Let’s look at the following repository list:

docker images
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
python                      3                   0a3a95c81a2b        12 days ago         932MB
<none>                      <none>              871503ecbdc9        4 weeks ago         392MB
sonarqube                   latest              d7558a6a8598        2 months ago        479MB
redis                       5.0.5               63130206b0fa        2 months ago        98.2MB
postgres                    9.6                 61c59b9a763f        2 months ago        230MB
postgres                    latest              e2d75d1c1264        2 months ago        313MB
mysql                       5.7                 383867b75fd2        2 months ago        373MB

To delete the selected image, we can use the command:

docker image rm <IMAGE_ID>

In the example below, I will remove the redis image and I will leave for the next example.

# Delete redis image
docker image rm 63130206b0fa

pawel@pawel:~$ docker image rm 63130206b0fa
Untagged: redis:5.0.5
Untagged: redis@sha256:5dcccb533dc0deacce4a02fe9035134576368452db0b4323b98a4b2ba2d3b302
Deleted: sha256:63130206b0fa808e4545a0cb4a1f14f6d40b8a7e2e6fda0a31fd326c2ac0971c
Deleted: sha256:9476758634326bb436208264d0541e9a0d42e4add35d00c2a7408f810223013d
Deleted: sha256:0f3d9de16a216bfa5e2c2bd0e3c2ba83afec01a1b326d9f39a5ea7aecc112baf
Deleted: sha256:452d665d4efca3e6067c89a332c878437d250312719f9ea8fff8c0e350b6e471
Deleted: sha256:d6aec371927a9d4bfe4df4ee8e510624549fc08bc60871ce1f145997f49d4d37
Deleted: sha256:2957e0a13c30e89650dd6c00644c04aa87ce516284c76a67c4b32cbb877de178

How to delete images tagged none <none>?

To delete all images with tag and repository use the command below (docker remove all none images):

docker rmi $(docker images --filter "dangling=true" -q --no-trunc)

As a result of the command you will receive information about what has been deleted:

Deleted: sha256:871503ecbdc9f2f2bb2989af6440d34b0eef684b730d317680a8440813f321b5
Deleted: sha256:eb22964fbb062e908432240a2d12a448e75db2081481422c2908ec7875074a00
Deleted: sha256:bdc87704af3a50bd53ae32edef6c7f020b8f144c7ab9b227a9905223a0e0885f
Deleted: sha256:d0cddd997d27bd75a0b75d36733e4350e5750f0d0182cd634801c579e9aba915
Deleted: sha256:1781e4eca03220934d1646f64a6d3775b935c6db2fb00474b5c8d9844e8faa1f

You can now check again if the images have actually been deleted using the command:

docker images

That’s all about how to how to delete images tagged none / <none>!

Could You Please Share This Post? 
I appreciate It And Thank YOU! :)
Have A Nice Day!


How useful was this post?

Click on a star to rate it!

Average rating 4.9 / 5. Vote count: 1905

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?