Error response from daemon: conflict: unable to remove repository reference "ubuntu" (must force) - container c880076398dc is using its referenced image 8847e9bf6df8
If you try to remove a docker image using docker rmi command and you get the above error, because, either there is a container with this docker image still running, or it is in EXITED state.Fix:
You will need to stop and remove the container that you created from the image before you can remove the image.
Run the docker ps -a command to see the containers,
% docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c880076398dc fedora "/bin/bash" 54 minutes ago Up 54 minutes brave_archimedes
Now first stop the container that is still referenced, c880076398dc in my case.
% docker stop c880076398dc c880076398dc
Now first remove the container that is still referenced, c880076398dc in my case.
% docker rm c880076398dc c880076398dc
Now you should be able to remove the image,
% docker rmi ubuntu Untagged: ubuntu:latest Untagged: ubuntu@sha256:cbf627299e327f564233aac6b97030f9023ca41d3453c497be2f5e8f7762d185 Deleted: sha256:8847e9bf6df80d7720e7daa5788671263f03a108a19cff8ff8c6f5f17fcad348 Deleted: sha256:e70c785847f52e4401c2cb812a809feaeee7c55d385dbb575db82288c7d41f76
Facing issues? Have Questions? Post them here! I am happy to answer!
- How to docker remove a container when it exits
- Install Python on Alpine Linux - Docker
- How to Rename Docker Image with none TAG and REPOSITORY?
- Remove all stopped containers in Docker using prune command
- [Fix] Docker Error response from daemon: manifest for :latest not found: manifest unknown
- [fix] Error response from daemon: conflict unable to remove repository reference ubuntu container is using its referenced image
- [Docker] Install Python3 on Alpine Linux
- Unable to find image docker latest locally
- How to Stop/Cancel/kill docker image pull
- How to know the Docker Engine Version
- [fix] Docker: OCI runtime exec failed unable to start container process
- [Solution] Alpine Docker apt-get: not found
- Install and Run Cassandra on Docker Desktop
- Install node on Alpine Linux Docker
- How to Copy files from Docker Container to Host System
- Install the minimal Linux on Docker (only 5 mb Alpine Linux)
- How to stop and start a docker container
- Docker - Error response from daemon: You cannot remove a running container
- Open Docker Desktop from macOS Terminal
- How to check installed docker version command
- How to know the Docker Sandbox ID of a Container Network?
- [fix] docker: Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory.
- [Docker] Install Git on Alpine Linux
- Docker MySQL Compose File with Volume Example
- [fix] Docker: Alpine Linux - /bin/sh: bash: not found
- How to tar.gz a directory or folder Command - Linux
- Text Case Converter - Convert to Upper/Lower/Proper/Random Case - Tools
- CRUD operations in Spring Boot + JDBC - Java
- Youtube spacebar not working in search on macOS Safari - MacOS
- Microsoft Office Mac Ventura: System Settings must be changed before Microsoft AutoUpdate can run - Microsoft
- How to List the SHA Digest of Docker Images - Docker
- How to save macOS Terminal outputs as text file - MacOS
- How to check the version of Python Modules - Python