Kasper
Kasper

Reputation: 1255

Remove docker image depending on an already removed image

So, I have been doing something I knew would end up bad, I used the docker rm -f flag to remove an image B because it kept on complaining that another image A was still using it and I didn't find that specific image A, couldn't see it, so I thought, I'll use '-f'. Unfortunately, of course it did exist, and now I cannot remove image A anymore because I removed its dependency image B and I keep on getting

Error response from daemon: No such id <id-of-already-removed-image-with--f-option>
error: failed to remove one or more images

when I try to remove it.

So basically, can I remove this image that points to an image that's not present anymore?

Upvotes: 2

Views: 73

Answers (1)

Kasper
Kasper

Reputation: 1255

Switched off docker through

service docker.io stop

changed the DOCKER_OPTS in /etc/default/docker.io to

DOCKER_OPTS="--graph=/home/kasper/dockerrepo"

restarted docker through service docker.io start and then removed Var/lib/docker. Didn't figure out a finer grained way of cleaning this up.

Upvotes: 1

Related Questions