repositories=$(curl ${registry}/v2/_catalog)
for repo in $(echo "${repositories}" | jq -r '.repositories[]'); do
tags=$(curl -sSL "http://${registry}/v2/${repo}/tags/list" | jq -r '.tags[]')
curl -v -sSL -X DELETE "http://${registry}/v2/${repo}/manifests/$(
-H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
"http://${registry}/v2/${repo}/manifests/$tag" \
| awk '$1 == "Docker-Content-Digest:" { print $2 }' \