Set Repositories Retention Period

JFrog Security Documentation

JFrog Xray
Content Type
User Guide

To set the retention period for a repository, do the following:

  1. In the Administration module, go to Xray | Settings | General and click Indexed Resources.

  2. Select the repository or multiple repositories and select Configure.

  3. Select one of the following:

    • Any artifact from the last number of days: The artifact will be retained for the number of days you set here, after the artifact is scanned. This will apply to all artifacts in the repository.

    • By Pattern: By pattern enables you to set a more granular retention period. It enables you to scan future artifacts within the specific path, and set a retention period for the historical data of artifacts after they are scanned.

      • Index: If checked, Xray will scan newly added artifacts in the path. Note that existing artifacts will not be scanned. If the folder contains existing artifacts that have been scanned, and you do not want to index new artifacts in that folder, you can choose not to index that folder.

      • Retention period: The number of days to retain artifacts data after they are scanned by Xray.

        For example, if you have one repository that contains all of your artifacts, you can set a retention period for artifacts within a folder in the repository. Let's assume your repository contains a production folder, and you would like to set a retention period for artifacts within that folder. You can provide the path to that folder as an include pattern and set the retention period. If that folder also contains other folders that you do not want to be scanned or retained, you can exclude it using the exclude pattern.


        Patterns are set using simple comma-separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example: "org/apache/**"

        Patterns are limited to 10 patterns per repository.

        If you select by pattern, you must define a retention period for all other artifacts in the repository in the All Other Artifacts setting.