I have cleaned contentstore, which was about 2 GB, from user files via script
var docs = search.luceneSearch("PATH:\"/app:company_home/cm:main//*\" AND TYPE:\"doc:somecontent\"");
var i;
for (i=0; i<docs.length; i++)
{
docs[i].remove();
}//folders
var docs = search.luceneSearch("PATH:\"/app:company_home/cm:main//*\" AND TYPE:\"cm:folder\" AND NOT TYPE:\"cm:systemfolder\" AND NOT @cm\\:name:\"folder1\" AND NOT @cm\\:name:\"folder2\" AND NOT @cm\\:name:\"folder3\" AND NOT @cm\\:name:\"folder4\" AND NOT @cm\\:name:\"folder5\" AND NOT @cm\\:name:\"folder6\" ");
var i;
for (i=0; i<docs.length; i++)
{
docs[i].remove();
}
When the contentstore was empty, I emptied trashcan too.
So the trashcan is absolutely empty.
The Alfresco instance is nearly clean, but the contentstore on file system is still of 2GB size.
How is it possible to remove unused content from repository on file system?
Alfresco Community (Build: 201612)
Solved! Go to Solution.
I have found a solution, seems like the repository is purged by special job contentStoreCleaner:
Cleaning up orphaned content (purge) | Alfresco Documentation
And it should take by default about 14 days to purge unused content.
I have found a solution, seems like the repository is purged by special job contentStoreCleaner:
Cleaning up orphaned content (purge) | Alfresco Documentation
And it should take by default about 14 days to purge unused content.
Maybe this helps:
https://i1.wp.com/blyx.com/wp-content/uploads/2014/08/Slide1.png
In Alfresco 5 you can set this parameter for reducing this protection:
system.content.orphanProtectDays=14
Also if you apply sys:temporary aspect before deleting you will bypass the thrascan.
Regards.
--C.
Final hint: use better search.query() instead search.luceneSearch()
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.