Skip to content

Retention Policies

Retention Policies in JFrog help organizations manage storage and maintain system performance as the volume of binaries grows with faster development cycles. These policies allow you to clean up or archive stale artifacts to optimize storage and meet compliance requirements. Additional details on Retention Policies can be found on JFrog Help website.

Retention policies are categorized into two types:

  • Cleanup Policies: Used to delete artifacts from a repository based on certain criteria.
  • Archive Policies: Used to move artifacts to a cold storage repository.

Supported Packages

To see which packages types are supported and under what conditions, please visit JFrog's documentation on Cleanup Supported Packages.

Policy Conditions:

JFrog Enterprise+ Platform supports two types of conditions for retention policies:

Time-Based

  • Packages Older Than
  • Packages Not Downloaded Since

Version Based

  • Number of Latest Versions to Keep

Make sure to check the Supported Packages to which policies can be applied to your package type.

Additional Settings

  • Cron Expression; used to set a schedule for policy execution.
  • Max Run Duration; limits the maximum duration the policy can run when enabled. The maximum allowed duration is 5 hours.
  • Skip Trash Can; this setting will cause packages to be permanently deleted from Artifactory instance without an option to restore them immediately after the cleanup policy is executed, bypassing the Trash Can repository (artifacts will stay in the Trash Can for 14 days after deletion).

  • Preview what would be deleted/move before executing

  • Example: How to do a dry-run and get report:

Restore Archived Packages

Restore is a non-destructive process, ensuring that none of the restored packages are deleted from the Archive Artifactory Instance. Please fine more information from JFrog Restore Archived Packages

Retention Policies Examples:

Below are some examples of scenarios where retention policies apply. These examples include some common scenarios for the enviroment. These policies can all be implemented via the Policy Conditions above.

  • Note: Examples are presuming a project key of dtand. This is for the example only, policies created for your project will have the same project key.

Retention Policy Examples

Additional Resources

For more details, please visit JFrog's documentation on Cleanup Policies and Archives.

Brought to you by DevTools and Enablement Team.