Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Clarification on Retention Rules and Recently Created Files Being Deleted



  • Hi ProGet team,

    While configuring the retention rules to manage when files should be deleted, I noticed something that I’d like to confirm.

    When using the setting Recent downloads: Never delete recently downloaded files, it appears that the rules are applied to newly created files that haven’t been downloaded yet.

    If my understanding is correct, this means a local artifact that was recently created — but has not yet been downloaded — could still be deleted when the retention rules run.

    Is this the expected behavior?
    And is there a way to ensure that newly created files (e.g., files younger than a certain number of days) are not deleted by the retention rules?

    Thanks in advance for any clarification or best practices!


  • inedo-engineer

    Hi @koksime-yap_5909,

    In the event that the artifact has not been downloaded (i.e. the last download date is "null"), then the publish date will be considered. So if you set "90 days", then an artifact will be deleted at earliest, 90 days from publication if it hasn't been downloaded.

    Thanks,
    Steve



  • Hi @stevedennis,

    I see, thanks for the explanation. However, based on the logs from running the retention rules in dry-run mode, it shows that foo.zip and bar.zip — which were newly uploaded to the assets directory and haven’t been downloaded yet — are marked for deletion.

    Will this actually happen during the real run, or is it just a misleading result from the dry-run output?

    Retention Rules Configuration:
    24eb763e-6815-41ff-b360-6a63bd2cde92-image.png

    Output logs:

    Running in dry run mode...
    Checking rule 1...
    Only delete packages that have not been requested in the last 90 days (since 08/07/2025 14:50:16)
    Finding packages that match retention rule 1...
    Getting count of matching packages...
    2 packages qualify for deletion under this rule.
    Deleting matching packages...
    Dry run mode is set; nothing will actually be deleted.
    Deleting example/foo.zip ...
    Deleting example/bar.zip ...
    Deleted 2 packages (154347 KB total).
    Done checking rule 1.
    

  • inedo-engineer

    Hi @koksime-yap_5909 ,

    Good catch; that is most definitely a bug. I just checked, and it's isolated to assets - packages and Docker images work as expected.

    This will be fixed in the upcoming maintenance release via PG-3150; it's shiping Friday, but we can provide a pre-release if you're interested in testing earlier.

    Thanks,
    Steve



  • Hi @stevedennis,

    Thanks for the update! I’m fine with waiting for the official release.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation