Our developer teams produce many NuGet packages which are published to Azure DevOps Artifacts feed. Most of them become unwanted over a week or two.
How can I select which artifacts should be covered with retention? Azure provides only general configuration, basically allowing only to specify a time after which artifacts will be retained. I was thinking about some sort of job which would select artifacts that match my criteria and delete them, but I'm afraid Azure DevOps REST API does not provide such functionality as Artifact deletion.
For example, I'd like to cover all pre-release packages with retention policy.
You can check your artifacts storage here (mind the placeholder)
https://dev.azure.com/<org>/_settings/storage
Retention policies overview https://docs.microsoft.com/en-us/azure/devops/pipelines/policies/retention?view=azure-devops&tabs=yaml
Artifacts how-to https://docs.microsoft.com/en-us/azure/devops/artifacts/how-to/delete-and-recover-packages?view=azure-devops&tabs=maven
Artifacts docs at Azure DevOps REST API https://docs.microsoft.com/en-us/rest/api/azure/devops/build/artifacts/get%20artifact?view=azure-devops-rest-5.1#artifactresource