eclipseeclipse-pluginequinoxp2

Programmatically uninstall feature


I am looking for a way to uninstall a particular feature in my product. The feature that is installed now needs to be replaced by a feature with the same name, but different version and different plugins associated with it during update - older version of product is being updated with the new one.

Doing some research I saw org.eclipse.equinox.p2.operations.UninstallOperation that looks like something I can use. I also saw instructions.uninstall phase in p2.inf that looks relevant.

Which is the preferred/better way to do feature uninstall?


Solution

  • This is a common misconception: the p2.inf install/uninstall instructions do not change the installed units, but describe the low-level actions that should be performed during an installation/uninstallation of an installable unit.