Cleanup old releases by listing all releases and keeping a configurable number of old releases (application option “keepReleases”). The current and previous release (if one exists) are protected from removal.

Note: There is no rollback for this cleanup, so we have to be sure not to delete any live or referenced releases.

It takes the following options:

keepReleases - The number of releases to keep.

onlyRemoveReleasesOlderThanXSeconds - Remove only those releases older than the defined seconds