oc adm prune images fails with error: Unable to prune layer, returned 404 Not Found

Solution Verified - Updated -

Issue

  • Image pruning from a registry not working
  • Size of the registry is very large (terabytes or so) and contains lots of old images
  • Following command fails:

    # oadm prune images --keep-tag-revisions=3 --keep-younger-than=60m --loglevel=8
    ...
    Unable to prune layer <IMAGE URI>, returned 404 Not Found
    

Environment

  • Red Hat OpenShift Container Platform (OCP) 3.7 and later

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In