Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
FAQ Revert an Update or Installation with p2
Updating your Eclipse plugins may occasionally result in a b0rk3d install. This situation usually occurs when somebody hasn't properly managed versions and inadvertently introduced an incompatibility that didn't surface during testing. Fortunately Eclipse manages its updates and installations using a checkpointing mechanism called p2, and p2 allows selectively uninstalling existing features as well as reverting to previous checkpoints.
If you can bring up the UI, then you can revert the change from within the Eclipse About dialogs.
But sometimes even the UI won't come up. Fortunately can use the command-line p2 director to revert:
- You first need to determine your p2 profile name. Look inside your Eclipse installation in the
p2/org.eclipse.equinox.p2.engine/profileRegistry/
directory. There is likely a single directory calledPPPPPP.profile
(e.g., SDKProfile.profile). ThePPPPPP
is the name of your profile. - Inside this profile directory are a set of files of the form
TTTTTT.profile.gz
whereTTTTTT
is a numeric timestamp. These timestamps are ordered. The latest timestamp is your current profile, resulting from your last installation or update, and the second-last timestamp is the profile before you did your last installation or update. Remember this second-last timestamp. - You will now invoke the p2 director from the command-line with the profile name
PPPPPP
and the previous timestampTTTTTT
as determined in the previous steps; if you're on Windows, use theeclipsec.exe
instead:
./eclipse -application org.eclipse.equinox.p2.director -profile PPPPPP -revert TTTTT
If all the referenced artifacts can be resolved, then your installation should be reverted to its previous state.
The p2 director also supports installing and uninstalling artifacts from the command-line.