14.6.3. Image prune conditions


OpenShift Container Platform supports two methodologies for pruning images:

  1. Pruning by age and tag
  2. Pruning by size limit

These methodologies are mutually exclusive. You must choose whether to prune by age and tag, or by size limit. Regardless of the method that you choose, the image pruner checks to ensure that images in use are not removed.

An image is only pruned if it meets the primary condition and is not actively referenced by a system component.

14.6.3.1. Pruning an image by age and tag

Pruning an image by age and tag is the default pruning strategy. It identifies images for removal by using the --keep-younger-than and --keep-tag-revisions flags. To prune an image by age and tag, the image must be older than the --keep-younger-than threshold, not one of the most recent tag revisions, and cannot be in use by an active workload.

For an image to be pruned by age and tag, all of the following conditions must be met:

  1. The image is managed by OpenShift Container Platform or has the openshift.io/image.managed annotation.
  2. The image is older than the time specified by the --keep-younger-than flag.
  3. The image is not one of the most recent images for its tag, as specified by the --keep-tag-revisions flag.
  4. The image is not currently referenced by any of the following active or recent API objects:

    • Pods or image streams created more recently than the --keep-younger-than duration.
    • Running or pending pods
    • Deployments, replication controllers, replica sets, or stateful sets.
    • Builds, build configurations, jobs, or cronjobs.

An image is only removed if it is old, not a recent tag revision, and is confirmed to have no active references by system components.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동