Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

How to retain a particular Asset version?

Avatar

Level 1

Hi - My organisation receives imagery from suppliers, which is directly uploaded into DAM. Creative team then does edits if the assets are not meeting quality standards, which then creates further versions. In this case original image received from supplier becomes version 1.0. If we don't do anything this 1.0 version gets dropped by the Version Cleanup process at some point as the number of versions increase. My organisation wants to retain this original version all the time and let the intermediate versions drop.

Is there anyway I can retain the original version?

Regards,

Kiran

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies

Avatar

Community Advisor and Adobe Champion

Yes, like what you said @KiranEd , by default, AEM periodically cleans up old asset versions based on rules set in the Version Manager configuration.

 

This process is controlled by the service com.day.cq.wcm.core.impl.VersionManagerImpl. The cleanup rules determine how many versions are kept and for how long, which is why older versions like the original supplier upload (version 1.0) can eventually be deleted.

To ensure that the original version is always retained, you need to adjust the OSGi configuration for this service. Specifically, you should set the property minNumberVersions to 1. This guarantees that at least one version, which will be the very first one created, is always preserved. You can then still control how many newer versions to keep by setting maxNumberVersions, and how long to keep versions based on their age with maxAgeDays.

Because this is AEM as a Cloud Service, you cannot edit the configuration directly in the Felix console. Instead, you must deploy the configuration as code through your Cloud Manager Git repository. You would add an OSGi configuration file under the /apps folder of your project, for example:

/apps/myproject/config/com.day.cq.wcm.core.impl.VersionManagerImpl.cfg.json

Inside that configuration file, you could set properties like:

{
  "versionmanager.maxNumberVersions": 5,
  "versionmanager.minNumberVersions": 1,
  "versionmanager.maxAgeDays": 30,
  "versionmanager.purgingEnabled": true
}

more details on the configuration options can be found here: https://experienceleague.adobe.com/en/docs/experience-manager-65/content/implementing/deploying/conf... 

After committing this file and deploying through Cloud Manager, the cleanup process will retain the original version permanently while continuing to purge unnecessary intermediate versions.

This approach ensures that the first uploaded supplier version is always available, while still keeping storage manageable by cleaning up later edits according to your retention policy.

Avatar

Level 1

Hi Brian, 

 

Thanks for your detailed response. Unfortunately, the behaviour that we have seen when trying this for ourselves does not line up with what you have outlined.

When we have configured the versionmanager to retain a certain number of versions e.g:

"versionmanager.maxNumberVersions": 5,  
"versionmanager.minNumberVersions": 3

 Then we have seen that once we exceed the maximum number of allowed versions, the oldest version (ie the original, version 1.0) is deleted, and the newest versions are retained. 

In fact, our requirement is the opposite of this. If we have 5 versions of an asset and a 6th is created, we need version 1.0 to remain in AEM, and need version 1.1 to be removed. Currently, versionmanager will delete the oldest version (ie 1.0).

Is there any way of customising AEM's version retention to retain the oldest version?

Thanks 

Avatar

Administrator

@KiranEd Just checking in. Were you able to resolve your issue? We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could benefit the community. Thanks again for being part of the conversation!



Kautuk Sahni