AEM - package garbage collection not working for me | Community
Skip to main content
Level 6
May 25, 2023
Solved

AEM - package garbage collection not working for me

  • May 25, 2023
  • 3 replies
  • 2221 views

hi folks,

I want to delete old packages so I created this osgi configuration for my server

com.adobe.acs.commons.packagegarbagecollector.PackageGarbageCollectionConfig.xml

 

I entered the following XML, intending to delete the packages in my_packages group older than 30 days every hour.

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
          jcr:primaryType="sling:OsgiConfig"
          scheduler="0 0 0/1 1/1 * ? *"
         maxAgeInDays="30"
          groupName="my_packages
          removeNotInstalledPackages="false"/>

However, after the code is deployed, the hour has come and gone and no sign of any INFO statements in the logs indicating that it has deleted the packages.

(https://adobe-consulting-services.github.io/acs-aem-commons/features/package-garbage-collector/index.html)

 

All I see is this.

*INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Registering resource with OSGi installer: [InstallableResource, priority=202, id=/apps/zzz/config.author.dev/com.adobe.acs.commons.packagegarbagecollector.PackageGarbageCollectionConfig, InstallableResource, priority=202, id=/apps/zzz/config.author.dev/com.day.cq.commons.impl.ExternalizerImpl, InstallableResource, priority=202, id=/apps/zzz/config.author.dev/com.adobe.acs.commons.wcm.impl.SiteMapServlet-sample, InstallableResource, priority=202, id=/apps/zzz/config.author.dev/com.zzz.filter.zzzRequestFilter]

 

any ideas anyone?

thanks

Fiona

 

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by DPrakashRaj

I assume it’s not for AAEMaaCS. After code deployment do you this service being registered at Felix console?

 

3 replies

DPrakashRaj
Community Advisor
DPrakashRajCommunity AdvisorAccepted solution
Community Advisor
May 25, 2023

I assume it’s not for AAEMaaCS. After code deployment do you this service being registered at Felix console?

 

Level 6
May 26, 2023

Thanks for replying. No it is an AMS installation, 6.5.x

After code deployment, I see this service in "bundles" and it is active. I also see the config in configMgr as I configured it.

thanks

Fiona

rawvarun
Community Advisor
Community Advisor
May 25, 2023

Can you change the configuration to run every 9:30 am and delete the package age of 1 day to see if the utility is working:

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" scheduler="0 30 9 ? * * *" maxAgeInDays="1" groupName="my_packages removeNotInstalledPackages="false"/>

 

Please note that the garbage collector will not remove the currently installed version of any packages that meet the age and group name criteria. Also, it is not compatible in AEM as cloud.

Level 6
May 31, 2023

Thanks. Actually I think my problem was that I configured the package garbage collector via a OSGi config file. When i ran it manually from system/console/configMgr it worked o.k.

Level 6
September 20, 2024

In reply to Muhammed's PM,

This is the OGSi system/console/configMgr entry for garbage collection that you can run.