Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

730
Views
image is being used by stopped container

I am trying to delete a docker container by this command:

docker rmi <Image-Id>

Obviously, I have replaced the Image-Id by the Id I get using:

docker images

But I see the error below:

Error response from daemon: conflict: unable to delete <Image-ID> (must be forced) - image is being used by stopped container xxxxxxxxxxx
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

You can also use --force , -f Force removal of the image

If you use the -f flag and specify the image’s short or long ID, then this command untags and removes all images that match the specified ID.

  docker rmi -f <image_id> 

Note: this command removes images being used by containers.

over 4 years ago · Santiago Trujillo Report

0

You need to delete the stopped container with docker rm, and then you can delete the image it uses with docker rmi.

over 4 years ago · Santiago Trujillo Report

0

You may also find that you have stopped containers that are causing the lock. Remove these first using:

docker rm  $(docker ps -q -a)

Here we are listing the docker processes by just the ID and then removing those; however, docker rm will only remove stopped containers.

Next go back and remove the images using:

docker image rm <image_id>
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!