eclipse p2 revert

Revert to an earlier p2 profile from the command line

Today, we’re running builds toward 3.7M5 for the milestone that will be available Friday, January 28.  This morning I updated to our latest integration build from the repository. Unfortunately, one of the bundles had a compile error which was serious enough to cause Eclipse to crash on startup.

If you want to revert your installation to a previous version, this is easy to do from the UI. Chris describes this here

However, if you can’t access the Eclipse UI, reverting becomes a bit more complicated. The online help illustrates how to use the p2 director application to revert your install to a previous profile state.

The list of profiles available in your Eclipse install are located in your profile registry.  The highlighted profile id below reflects my working installation from last week.

To revert to this profile, I downloaded a new build, extracted it to a directory and ran the following command

C:\N20110122-2000\eclipse\eclipsec.exe -application org.eclipse.equinox.p2.director -repository -revert 1295719004390 -destination c:\I20100309-0809\eclipse -profile SDKProfile -bundlepool C:\I20100309-0809 -p2.os win32 win32 -p2.arch x86

Operation completed in 68759 ms. 

My install was reverted to the previous profile and I could once again start Eclipse.

4 comments on “Revert to an earlier p2 profile from the command line

  1. This p2 stuffs seems to work really well.


  2. Yes, I heard a rumour that the p2 committers are top notch.


  3. Hi ! I found this page today and I'm glad I did because the revert operation is not that much documented.

    Just a little hint, in your article you wrote -p.arch x86 for the command, and it's -p2.arch


  4. Hi Vincent, I've corrected the typo, glad you found the article useful.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: