Edit icon Edit This Page

List the versions the retention rules would delete now

List the versions a run would delete if it started now, oldest first, at most as many as one run deletes. Without flags it previews the rules of the policy; the flags change them for the preview only. Nothing is deleted or saved, and the policy need not be enabled.

A run considers the versions of the packages whose whole name matches –package-regex (with –prerelease-only, only prereleases and Maven SNAPSHOT builds). Of those it keeps the –keep-last newest of each package and deletes any other that is older than –keep-days and does not match –keep-version-regex. A package never loses its last version, and an npm version a dist-tag points to is kept. Patterns are RE2 regular expressions.

The table lists the versions and stderr the total; –output json prints the API fields (versionCount, totalBytes, versions).

rp repo retention preview <repo> [flags]

Options

      --cadence string              How often the policy runs: daily, weekly, biweekly, monthly or quarterly
      --keep-days int32             Delete only versions older than N days (0 to 3650; 0 deletes by count alone)
      --keep-last int32             Always keep the newest N versions of each package (1 to 1000)
      --keep-version-regex string   Never delete the versions whose whole name matches this regular expression (empty keeps none)
      --package-regex string        Apply to the packages whose whole name matches this regular expression
      --prerelease-only             Delete only prereleases and Maven SNAPSHOT builds

Options inherited from parent commands

      --api-url string           Panel API URL of the profile, overrides the stored value
      --ca-file string           PEM file with extra trusted CA certificates
      --debug                    Print debug output with secrets redacted
      --hostname string          Repsy host to use instead of the current profile
      --insecure                 Do not verify TLS certificates (unsafe; plain http is chosen with the URL, not with this flag)
      --insecure-storage         Keep credentials in a plain 0600 file instead of the OS keyring (unsafe; a warning is printed once per command)
      --jq string                Filter JSON output with a jq expression (implies --output json)
      --no-color                 Disable colored output
      --no-input                 Never prompt; fail when input is needed
      --output table|json|yaml   Output format: table, json or yaml (default table; json when --jq is given)
      --owner string             Owner segment of Cloud URLs (default: your account, or the one account that shares a repository of that name with you); --owner= means none
      --registry-url string      Protocol host URL of the profile, overrides the stored value
      --type os|cloud            Product of the host, overrides detection
      --web-url string           Panel UI URL of the profile (where /cli/auth lives), overrides the stored value
      --yes                      Answer yes to confirmation prompts

See also

Found a problem with this page?