docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 876 forks source link

Delete repository with v2 REST API? (when images, tags are removed and even GC has run) #1108

Open davvdg opened 6 years ago

davvdg commented 6 years ago

Hi. I've been through all the previous post about deleting images and tags using the v2 api. (#1066 , #1068 ). I'm able to delete the latest tag using the v2 rest API, run the garbage colector, restart my registry and repush the same image without having the "layer exists" message. Everything is fine. except...

I cannot remove the repository name, the one which is deplayed when running v2/_catalog Even if the images are empty with no tags and no files remaining, the name is still in the list and I don't know how to remove it. So I'm stuck with "ghost" repositories that I'd like to be removed for good. Is there an hidden REST command to do it ?

Best regards

David

hjdr4 commented 6 years ago

Same problem here, after deletion by tag, the image name has at least one reference.

curl -s 'http://repos/v2/image/tags/list'                   
{"name":"image","tags":null}

Wheras

curl -s 'http://repos/v2/nonexisting/tags/list'     
{"errors":[{"code":"NAME_UNKNOWN","message":"repository name not known to registry","detail":{"name":"nonexisting"}}]}
de1m commented 6 years ago

+1 I've the same issue. I've deleted all tags and layers, but I cannot delete repository

lcastrooliveira commented 6 years ago

Same issue

lcastrooliveira commented 6 years ago

There is a workaround here Check the last comment, you have to manually delete the repository folders inside the registry volume.

vitalyzhakov commented 6 years ago

+1. I've have same issue.

271560sj commented 6 years ago

+1,same issue