How to delete repository from private registry?

You can remove entire repository using curl:

curl -X DELETE registry-url/v1/repositories/repository-name/

To remove unused images you have to remove tag first:

curl -X DELETE registry-url/v1/repositories/repository-name/tags/<tag>

then run this script on docker registy server, make sure you install ‘jq’ package first:

https://gist.github.com/kwk/c5443f2a1abcf0eb1eaa

References