Skip to main content
Jump to: navigation, search

FAQ Revert an Update or Installation with p2

Revision as of 11:12, 21 April 2015 by (Talk | contribs) (Need to explicitly specify repositories)

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.


p2's checkpoints, called a profile, record just the set of artifact names and versions that were installed at a particular moment in time. p2 assumes that it can recreate a previous checkpoint by obtaining the corresponding artifacts. If p2 cannot resolve artifacts from its local caches or its configured remote repositories, then the process will fail. This caveat is very important if you install artifacts from repositories whose contents are frequently replaced (e.g., nightly builds).

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:

  1. 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 called PPPPPP.profile (e.g., SDKProfile.profile). The PPPPPP is the name of your profile.
  2. Inside this profile directory are a set of files of the form TTTTTT.profile.gz where TTTTTT 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.
  3. You need to gather the p2 repositories where artifacts can be resolved from
  4. You will now invoke the p2 director from the command-line with the profile name PPPPPP and the previous timestamp TTTTTT as determined in the previous steps; if you're on Windows, use the eclipsec.exe instead:
   ./eclipse -application org.eclipse.equinox.p2.director -profile PPPPPP -revert TTTTT \
       -noSplash -repository comma,separated,repository,urls

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.


Eclipse committers frequently update to the latest integration builds. Occasionally one of the I-builds goes bad. To revert, they'd run something like:

   ./eclipse -noSplash -consolelog -application org.eclipse.equinox.p2.director \
       -profile SDKProfile -revert 1429305715350 \

Back to the top