Skip to content

Instantly share code, notes, and snippets.

@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active May 27, 2024 13:41
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \