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!
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
- Install Docker on Mac using brew cask
- How to know the Docker Sandbox ID of a Container Network?
- How to Rename Docker Image with none TAG and REPOSITORY?
- How to know list of images available on your device
- Docker Alpine Linux and Apache2 Example
- Install Bash on Alpine Linux - Docker
- Docker Run Command Examples - Part 1
- Install the minimal Linux on Docker (only 5 mb Alpine Linux)
- [fix] docker: Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory.
- Install RabbitMQ on Docker
- How to know docker Engine details
- [Fix] Docker Error response from daemon: manifest for :latest not found: manifest unknown
- How to stop and start a docker container
- How to create volume in Docker using Command
- How to know the Docker Engine Version
- [docker] Error response from daemon: No such container
- Install Docker for Mac using Home-brew Cask
- Docker - Incompatible CPU detected - M1/M2 Mac (macOS Sonoma)
- [fix] Docker Desktop App not starting on Mac (macOS)
- Unable to find image docker latest locally
- How to Stop/Cancel/kill docker image pull
- List of what's new in Docker 4.23
- [Docker M1/M2 Mac] qemu-x86_64: Could not open /lib64/ld-linux-x86-64.so.2: No such file or directory AWS CLI
- Install Docker Desktop on M1/M2 Apple Silicon ARM Chip Mac
- Docker - Running in Resource Saver mode
- Fix Ubuntu /bin/sh: 1: zsh: not found error - Ubuntu
- How to remove quotes from a String in Python - Python
- Python: Append Values as Prefix or Suffix to a Set Elements - Python
- Easy Steps to Upgrade iPhone to the new iOS 16 - HowTos
- HTML Images - Attributes and Formats - Html
- How to Open and Use Windows Terminal App - Windows
- How to Fix AttributeError in Python - Python
- Convert Java List to Json String using Jackson - Java