Back to ITRS Analytics FAQ

How to purge old unused images

security scans, scanned, images, purge, prune, configuration, disk space, unused

Problem Copied

I need to have a cleanup of all older ITRS analytics images that are un-used because they are either taking up disk space or they are flagging as vulnerable on our security scanners.

Possible solutions Copied

Check and locate older images - Example - I want to remove the below old unused java version - Note you must ensure that the target that is set to be removed is not being used by a current ITRS Analytics version.

find / -name 'java-21-openjdk-21.0.6.0.7-1.el9.x86_64'

Verify that old imagine versions are still present

k0s ctr i ls | grep obcerv | cut -d' ' -f1

Prune images

k0s ctr i prune --all

Verify that older images are not present

Re-run

find / -name 'java-21-openjdk-21.0.6.0.7-1.el9.x86_64'

This should return with no results

Re-run

k0s ctr i ls | grep obcerv | cut -d' ' -f1

This will return a shorter list with only the current versions - older versions should not show when running this command.

["Geneos"] ["FAQ"]

Was this topic helpful?