AEM as a Cloud Service: Version purging maintenance task does not remove excess asset versions as expected

This article explains how to troubleshoot and resolve situations where the version purging maintenance task in Adobe Experience Manager (AEM) as a Cloud Service does not remove asset versions beyond the configured maximum, leaving more versions than expected.

Description description

Environment

Adobe Experience Manager as a Cloud Service (all versions)

Issue/Symptoms

  • The version purging maintenance task in Adobe Experience Manager (AEM) as a Cloud Service is designed to automatically remove older versions of assets when the number of versions exceeds a configured maximum.
  • This process helps manage repository size and ensures that only a set number of recent versions are retained.
  • After configuring the version purging maintenance task with a maximum version limit, assets with more versions than the limit retain all versions after the scheduled maintenance run.
  • The expected behavior is that only the configured maximum number of versions should remain, but excess versions are not purged.
  • The number of versions for certain assets remains above the configured limit.

Cause

This issue can occur if the retainLabelledVersions flag in the version purging maintenance configuration is set to true. When this flag is enabled, labelled versions are not purged, which can prevent the total version count from dropping below the configured maximum.

Resolution resolution

Follow the steps below to resolve the issue.

  1. Review the version purging maintenance configuration YAML file in the relevant environment.
  2. Locate the retainLabelledVersions flag in the configuration.
  3. If you want all versions above the maximum limit to be purged, including labelled versions, set retainLabelledVersions to false.
  4. Ensure that the maxVersions parameter is set to the desired maximum number of versions to retain.
  5. Deploy the updated configuration using the standard deployment pipeline.
  6. Wait for the next scheduled maintenance run to execute the version purging task.
  7. Verify that the number of versions for affected assets has been reduced to the configured maximum after the maintenance run.

Maintenance tasks in oud Service

recommendation-more-help
experience-cloud-kcs-help-kbarticles