Skip to main content

Retention Rules (Beta)

Retention rules help you automatically delete old content from repositories to keep storage and metadata clean over time.

Retention rules are currently in beta. We’d love your feedback on what works, what’s missing, and what you’d like improved.

What are retention rules?

A retention rule is a policy that RepoFlow periodically runs to delete content that matches criteria you define (for example, older artifacts).

Why you might need them

  • Control storage growth: Automatically clean up outdated artifacts.
  • Reduce clutter: Keep repositories focused on the versions you actively use.
  • Operational hygiene: Prevent very old/unused artifacts from accumulating indefinitely.

Rule types

RepoFlow supports three retention rule types:

Rule typeWhat it deletesNotes
PackageEntire packagesThis deletes the package and its versions. Use with care.
Package versionsSpecific versions of a packageRecommended starting point for most use cases.
FilesSpecific filesDisabled by default because it can break packages. Only use if you deeply understand RepoFlow’s file model and you really know what you’re doing.

Screenshots

Create retention rule
Retention rules builder UI
Create a retention rule using conditions, sorting, and scheduling.
Dry run
Retention rule dry run results
Preview what would be deleted before enabling the rule.

Enabling and configuration (self-host)

Retention rules are controlled by server environment variables. See Server Environment Variables for the full list, including:

Feedback

Feedback is very welcome, feel free to reach out at support@repoflow.io.