|Re: [p2-dev] How to delete org.eclipse.equinox.p2.core/cache programmatically?|
Thanks Pascal. Yes, all the items in the .blobstore directory are downloaded binaries.
I am wondering why does P2 keep this cache? We already have another cache in "p2/org.eclipse.equinox.p2.repository/cache" which holds repository contents.jar and artifacts.jar files.
If we keep all the downloaded artifacts in p2/org.eclipse.equinox.p2.core/cache is there a p2 policy to delete old files (older than some days)? If not we will use up a lot of disk space.
From: Pascal Rapicault <pascal.rapicault@xxxxxxxxxxxx>
Reply-To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
Date: Monday, 26 November, 2012 2:12 PM
To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
Subject: Re: [p2-dev] How to delete org.eclipse.equinox.p2.core/cache programmatically?
This cache is an ArtifactRepository so you should be able to flush it using the removeAll() method.
You can load this repository from the IArtifactRepositoryManager. The URI for this repo can be computed as follow:
IAgentLocation location = getAgentLocation(agent);
if (location == null)
return URIUtil.append(location.getDataArea("org.eclipse.equinox.p2.core"), "cache/"); //$NON-NLS-1$ //$NON-NLS-2$
You are saying that you have a lot of item in the .blobstore, can you confirm that these are all binaries?
I am working on a feature in our RCP product to install software from customized P2 repositories. Each build of that software produces one dedicated repository (labelled with the build id to make it unique).
Everything works fine. P2 can install multiple release builds of the software. However, I find out the "eclipse/p2/org.eclipse.equinox.p2.core/cache" directory grows very big after I install several builds? Especially the ".blobstore" directory contains all the downloaded artifacts.
Is there a way to programmatically delete this cache?