docker-archive / docker-registry

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

How to Delete repository and tag with v2 REST API #1038

Closed alan-yang1987 closed 8 years ago

alan-yang1987 commented 8 years ago

I want to know how can i delete the repository and tag from the registry with v2 REST API, seems currently only the image itself can be deleted, if there any api for this? thx.

bchanan03 commented 8 years ago

me too...as I have 75 tags for same container

BrianBland commented 8 years ago

v2 registry questions should be asked in docker/distribution

Currently there is no tag delete API method, with the intent being to keep the delete method "safe" in that it only can reference an absolute image manifest instead of a mutable tag, especially in the case of eventually-consistent storage backends.

It's not in the v2 REST API, but if you absolutely need to delete a repository from your storage backend you can instantiate a Vacuum (https://github.com/docker/distribution/blob/master/registry/storage/vacuum.go) with a configured StorageDriver and call the RemoveRepository method on it.