Error response from daemon: conflict: unable to remove repository reference "postgres:15" (must force) - container d8c593fad145 is using its referenced image 9a18aed4ecdd
Check whether it's running: If you no longer need it, remove it: If it's running, stop it first: Then remove the image: Option 2: Force remove the image Option 3: Find all…
On this page
- Check whether it's running:
- If you no longer need it, remove it:
- If it's running, stop it first:
- Then remove the image:
- Option 2: Force remove the image
- Option 3: Find all containers using the image
- If your goal is simply to free disk space, you can also remove all unused containers and images:
- or remove only stopped containers:
- and then try:
Check whether it's running:
bash
docker ps -abash
docker ps -a --filter id=d8c593fad145If you no longer need it, remove it:
bash
docker rm d8c593fad145If it's running, stop it first:
bash
docker stop d8c593fad145
docker rm d8c593fad145Then remove the image:
bash
docker rmi postgres:15Option 2: Force remove the image
bash
docker rmi -f postgres:15
docker image rm -f postgres:15Option 3: Find all containers using the image
bash
docker ps -a --filter ancestor=postgres:15
docker container ls -a --filter ancestor=postgres:15If your goal is simply to free disk space, you can also remove all unused containers and images:
bash
docker system prune -aor remove only stopped containers:
bash
docker container pruneand then try:
bash
docker rmi postgres:15docker/error.md
Related articles
- DockerDockerList docker images Start docker image List docker running process Remove docker container id Delete docker images To remove the container To remove image To list image
- DockerDocker ComposeRun docker in background Stop the container List volumes inspect List running docker To access the container Build images Update a specific service only Bonus Tip (Clean Up):…
- DockerDocker Hub2.Build the Production Image:Target Dockerfile.prod explicitly.Build your image using your production Dockerfile (Dockerfile.prod). Give it a primary tag corresponding to your…
- DockerNo spacke left to move Docker's data directory:Then create /etc/docker/daemon.json: Restart docker