Tidy Up ProGet with Retention Rules


Crista Perlton

Crista Perlton


npm Package Approval Flows & Connectors 07th December, 2023

Making Sense of npm Package Licenses 30th November, 2023


Tidy Up ProGet with Retention Rules

Posted on .

Running out of disk space on a server creates all sorts of hard-to-diagnose problems at unexpected (and usually inconvenient) times. Define retention rules to keep ProGet tidy and disk space conserved by removing old or unused packages.

What Are Retention Rules?

“Retention rules” refer to any parameter you set to define what should and shouldn’t be kept. There are a number of conditions that might govern a retention rule, like “dump X when disk space runs low” or “delete packages over Y days old.” This automates an otherwise manual process to “spring clean” your disk. Not only does this save disk space, it also saves developer time (and therefore organizational money) through automation.

Retention Rules in ProGet

Retention rules are configurable in all versions of ProGet, but they will only execute in paid versions of ProGet. In ProGet Free, configured retention rules will execute only in dry-run mode.

Retention rules are configured at the feed level (not globally) and can be configured for packages, containers, and/or assets (although these rules trigger differently) or by quotas. ProGet also supports the use of a wildcard (*) to define more expansive retention rules. ProGet offers a variety of retention rule configurations so you can define rules that meet your needs for each feed. When a rule consists of multiple delete actions, only packages, containers, and assets that meet all criteria may be deleted. You can also configure more than one rule per feed, which run in the order they appear (from top to bottom) in the ProGet UI.

Configuring Retention Rules

Navigate to the Manage Feed page for your feed, and select the “Storage & Retention” tab:

From there, you can add retention rules to meet your organization’s needs for that feed:

Note that, when a feed has multiple rules applied to it, rules run from first-configured to last, one at a time, and if you set a quota rule that wasn’t met, it’s possible not all rules will run if space if enough free space exists.

Get Cleaning!

Retention rules are just one of the features that help you use ProGet better. Consider re-scoping user privileges, reassessing vulnerabilities, and reviewing restricted licenses to keep your ProGet in tip-top shape. Anyone may request and instantly receive a 30-day free trial of ProGet Basic (no credit card required) through MyInedo to give these retention rules and other paid features a try.

Crista Perlton

Crista Perlton