Your registry has to have set REGISTRY_STORAGE_DELETE_ENABLED variable.
curl -s localhost:52000/v2/_catalog | jq
curl -s localhost:52000/v2/test/tags/list | jq
curl -s -I --request HEAD --header "Accept: application/vnd.docker.distribution.manifest.v2+json" localhost:52000/v2/test/manifests/test33 | grep ^Docker-Content-Digest | cut -d: -f2,3
Now you can:
Delete the blob identified by name and digest
curl --request DELETE --header "Accept: application/vnd.docker.distribution.manifest.v2+json" localhost:52000/v2/test/blobs/<digest>
or
Delete the manifest or tag
curl --request DELETE --header "Accept: application/vnd.docker.distribution.manifest.v2+json" localhost:52000/v2/test/manifests/<digest>
You have to use the hash type in digest like sha256:FEWIoj3242ji…
curl --request DELETE --header "Accept: application/vnd.docker.distribution.manifest.v2+json" localhost:52000/v2/test/manifests/sha256:FEWIoj3242ji
However, delete only removes references within the repositories. To recover space you will need to garbage collect. Example when running registry directly on server:
docker run --rm registry:2 garbage-collect [--dry-run] /etc/docker/registry/config.yml
Example when running registry as a docker container:
docker exec -it docker-registry sh # enter container first /bin/registry garbage-collect [--dry-run] /etc/docker/registry/config.yml