0

I am trying to remove a docker image using docker rmi <image> command, but I am getting "No such image" error.

Below is the sequence of commands I executed. Why does it show I have an ubuntu image but does not let me remove it? I am running docker version 18.06.3-ce on CentOS 8.

[root@localhost student]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@localhost student]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@localhost student]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              18.04               549b9b86cb8d        4 days ago          64.2MB
centos              latest              0f3e07c0138f        2 months ago        220MB
[root@localhost student]# docker rmi ubuntu
Error: No such image: ubuntu
[root@localhost student]#
1

If you just say ubuntu it looks for ubuntu:latest while what you have is ubuntu:18.04. So try docker rmi ubuntu:18.04. You can also delete by ID: docker rmi 549b9b86cb8d.

1
  • Thanks xenoid. That worked. Dec 23 '19 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.