Expand my Community achievements bar.

SOLVED

Removing Service Packs from Install Folder

Avatar

Level 1

Is there a way to remove packages from the crx-quickstart/install folder without uninstalling them?

 

Background:

We upgrade our AEM instances by copying the service packs to the install folder.

If a content package is removed from the install folder, it gets uninstalled and its content is removed. This even happens if the instance is first shut down before the package is removed, after restart the content is gone again.

The same happens with a service pack. /productinfo still shows the version of the current service pack, but we can notice that some of the files of the service pack being uninstalled. I assume this means the service pack was partially uninstalled.

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

Talking about the service packs, one of the main problems with them is that you can't effectively uninstall them once they are installed, and in any case removing them it absolutely does not help.

You must understand that they are special packages and they have to be handled in a special way. Using the install folder to upgrade the AEM instance does not look as a good idea.

If you wish to automate the upgrade process of multiple AEM instances you can use the REST services of the package manager instead.

This approach is surely better and safer, and you can always remove the packages from /etc/packages once they are installed, if you wish.

 

https://experienceleague.adobe.com/docs/experience-manager-65/administering/operations/curl.html?lan...

View solution in original post

3 Replies

Avatar

Correct answer by
Level 2

Talking about the service packs, one of the main problems with them is that you can't effectively uninstall them once they are installed, and in any case removing them it absolutely does not help.

You must understand that they are special packages and they have to be handled in a special way. Using the install folder to upgrade the AEM instance does not look as a good idea.

If you wish to automate the upgrade process of multiple AEM instances you can use the REST services of the package manager instead.

This approach is surely better and safer, and you can always remove the packages from /etc/packages once they are installed, if you wish.

 

https://experienceleague.adobe.com/docs/experience-manager-65/administering/operations/curl.html?lan...

Avatar

Employee Advisor

Hi @basil ,

 

What I think is you are looking for a deletion logic for packages without getting rid of the content.

Lets understand the packaging in AEM and how it is stored in CRX.

 

  1. Open CRX/DE
  2. Navigate to /etc/packages folder.
    • Here you will find all the packa
      ge_groups folder listed.
    • For eg. I have service pack 6.5.9 uploaded yet (not installed).
    • The group is adobe/cq650/servicepackScreenshot 2022-06-11 at 4.14.57 PM.png
  3. When the package is in uploaded state you cansee a n
    ode in crx at:/etc/packages/adobe/cq650/servicepackScreenshot 2022-06-11 at 4.18.38 PM.png
  4. Now, when you install the package, a .snapshot folder is created which has info about the installation:
     Screenshot 2022-06-11 at 4.23.21 PM.png

     

  5. To achieve your use case of deletion of package to reclaim space, you can delete the node safely and your package content remains installed and intact.

 

  • Note, if this is one time time activity you can do it manually.
  • But if you want to automate the same you can write a Service which gets node using resourceResolver and deletes the node.(this wont uninstall the content)
  • You can also write a scheduler which cleans up for you at given frequency where you can give the groupnames via config.
  • You can also customise your scheduler to delete packages older than X days (lets say, delete packages older than 3 days belonging to temporary group).I can help you with code if you wish to implement the same. 

 


Thanks,

Milind