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:

    # oc adm 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:
- 3.7
- 3.9
- 3.10
- 3.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content