ARTIFACTORY: How to delete specific docker images based on name and patterns from Artifactory

ARTIFACTORY: How to delete specific docker images based on name and patterns from Artifactory

AuthorFullName__c
Rohith Balachandran
articleNumber
000005595
ft:sourceType
Salesforce
FirstPublishedDate
2023-03-01T17:32:31Z
lastModifiedDate
2023-03-01
VersionNumber
1
Note: Below is an example that is tested and working fine. This is a sample script for clearing docker images. Not ideal for all scenarios and is highly recommended to test in lower environments. The motive is only to help a few of the users who are interested in removing old images. This is not officially supported but can help users who are interested in scripting. There are a few other officially supported mechanisms available on JFrog confluence page/s.

If we have too many docker images in the Artifactory, it is quite difficult to manage them. It is always recommended to clean up unwanted images. Here, we are going to achieve this using a Python script that deletes docker images by matching names and patterns.