title: Docker Registry 2.0 - how to delete unused images?
body: <p>We updated our private docker registry to the official Registry 2.0. This version can now delete docker images identified by a hashtag (see <a href="https://docs.docker.com/registry/spec/api/#deleting-an-image">https://docs.docker.com/registry/spec/api/#deleting-an-image</a>) but I still don't see a way to cleanup old images.</p>
  
  <p>As our CI server is continously producing new images, I would need a method to delete all images from the private registry which are no longer identified by a named tag.</p>
  
  <p>If there's no built-in way to achieve this, I think a custom script could possibly work, but I don't see a v2 API method either to list all stored hashtags of an image.. </p>
  
  <p>How can I keep my private registry clean? Any hints?</p>