Is there any method to clean old plugins/features from disk automatically once new plugin/features are installed in eclipse RCP?
Asked Answered
B

1

3

I am building an RCP application, where there will be updates in the features/plugins every quarter. So, if a user chooses to auto update the feature/plugin then new jars for updated plugins are getting downloaded, but the old plugins are still using my disk space which are no more in use.

I have tired deleting the installation history which has the information of old jar. While I try to delete it, it shows me the below given message

Error Message for deleting installation history

But this does not delete the .jar, I can still find it in my feature/plugin folder.

Also, this is a manual process. So, is there any way where the old plugins gets deleted automatically when there is new jars with updated version.

Beulabeulah answered 28/10, 2020 at 8:43 Comment(0)
C
3

Enable the p2 garbage collector in your plugin_customization.ini file as follows for that:

# after upgrading delete the plug-ins that are no longer needed
org.eclipse.equinox.p2.ui.sdk.scheduler/gcOnStartup=true

For details see the Eclipse wiki: Equinox p2 FAQ - Why aren't bundles being removed when their associated feature has been removed?

Cassis answered 28/10, 2020 at 10:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.