Way to delete the images from Private Docker Registry

I have a Private Docker Registry set up and i have pushed some images from other machine to this registry.
Its a V2 registry.
I don’t know a novel way to delete the images from repositories since these pushed images doesn’t get listed in CLI for “docker images”.

Can anyone suggest me the proper way to delete those images from the disk?

  • RUN command in Dockerfile not persisting from container to container
  • How do I run a shell script and jar application in a docker image?
  • How to forward SSH into GitLab Docker container based on requested domain
  • Run Chromium inside container: libGl error
  • How to share gradle cache with docker containers
  • Does Docker EXPOSE make a new layer?
  • Appreciate a lot for answer.


  • Docker 1.6 and Registy 2.0
  • Naming Docker Containers on start ECS
  • I am trying to assign an ip from our corporate LAN to a docker container
  • Want to use volumes in my running Docker container
  • What are advantages of writing script file in Docker?
  • NFS in Docker: exportfs: <path> does not support NFS export
  • 2 Solutions collect form web for “Way to delete the images from Private Docker Registry”

    Currently you cannot delete an image from a docker registry without an external tool. The easiest way to do so would be to use this script to do so, keeping in mind that it does require downtime.

    I have posted same answer to other question. Maybe it would be useful for you.

    I’ve faced same problem with my registry then i tried the solution listed below from a blog page. It works.

    Step 1: Listing catalogs

    You can list your catalogs by calling this url:


    Response will be in the following format:

      "repositories": [

    Step 2: Listing tags for related catalog

    You can list tags of your catalog by calling this url:


    Response will be in the following format:

    "name": <name>,
    "tags": [


    Step 3: List manifest value for related tag

    You can run this command in docker registry container:

    curl -v --silent -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X GET http://localhost:5000/v2/<name>/manifests/<tag> 2>&1 | grep Docker-Content-Digest | awk '{print ($3)}'

    Response will be in the following format:


    Run the command given below with manifest value:

    curl -v --silent -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X DELETE<name>/manifests/sha256:6de813fb93debd551ea6781e90b02f1f93efab9d882a6cd06bbd96a07188b073

    Step 4: Delete marked manifests

    Run this command in your docker registy container:

    bin/registry garbage-collect  /etc/docker/registry/config.yml  

    Here is my config.yml

    root@c695814325f4:/etc# cat /etc/docker/registry/config.yml
    version: 0.1
      service: registry
            blobdescriptor: inmemory
            rootdirectory: /var/lib/registry
            enabled: true
        addr: :5000
            X-Content-Type-Options: [nosniff]
        enabled: true
        interval: 10s
        threshold: 3
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.