Checking with "ibmcloud cr images" I see I have several hundred old images in IBM Cloud container registry. Is there a way to delete them all, or delete by date? For example, images older than one year?
(Some shell script will probably do, of course...)
There are multiple options to remove many images at once from the IBM Cloud Container Registry:
ibmcloud cr image-prune-untagged
(see here for syntax) to remove all images that are not explicitly tagged.ibmcloud cr image-list --format '{{.Repository}}@{{.Digest}}'
to list all images and only print the repository and digest. Use this templating syntax to filter on some properties to reduce the list. Then, use that output list as input for ibmcloud cr image-rm
(syntax).