docker-registry icon indicating copy to clipboard operation
docker-registry copied to clipboard

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

Open davvdg opened this issue 7 years ago • 6 comments

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

davvdg avatar Aug 23 '17 17:08 davvdg

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"}}]}

hjdr4 avatar Aug 29 '17 14:08 hjdr4

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

de1m avatar Nov 16 '17 13:11 de1m

Same issue

lcastrooliveira avatar Nov 28 '17 14:11 lcastrooliveira

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

lcastrooliveira avatar Nov 28 '17 14:11 lcastrooliveira

+1. I've have same issue.

vitalyzhakov avatar Jan 02 '18 11:01 vitalyzhakov

+1,same issue

271560sj avatar Feb 08 '18 01:02 271560sj