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

Have Questions? Post them here!
- 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
- Where are Notepad++ macros stored? - NotepadPlusPlus
- Java SE 8 Update 301 available with various bug fixes and security improvements - Java
- How to enable Dark Mode in Windows 11 - Windows-11
- Android is starting optimizing... app 1 of 1 - Android
- Backup your Mac before you update to macOS Ventura using Time Machine - MacOS
- How to get SharePoint List Item URL using PowerShell - SharePoint
- Android Toast position top - Android
- How to remove disable google search blue triangle - Google