<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cleaning contentstore in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/cleaning-contentstore/m-p/70670#M23151</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have cleaned contentstore, which was about 2 GB, from user files via script&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var docs = search.luceneSearch("PATH:\"/app:company_home/cm:main//*\" AND TYPE:\"doc:somecontent\"");&lt;/P&gt;&lt;P&gt;var i;&lt;BR /&gt; for (i=0; i&amp;lt;docs.length; i++)&lt;BR /&gt; {&lt;BR /&gt; docs[i].remove();&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;//folders&lt;/P&gt;&lt;P&gt;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:\"&lt;SPAN&gt;folder2&lt;/SPAN&gt;\" AND NOT @cm\\:name:\"&lt;SPAN&gt;folder3&lt;/SPAN&gt;\" AND NOT @cm\\:name:\"&lt;SPAN&gt;folder4&lt;/SPAN&gt;\" AND NOT @cm\\:name:\"&lt;SPAN&gt;folder5&lt;/SPAN&gt;\" AND NOT @cm\\:name:\"&lt;SPAN&gt;folder6&lt;/SPAN&gt;\" ");&lt;BR /&gt; var i;&lt;BR /&gt; for (i=0; i&amp;lt;docs.length; i++)&lt;BR /&gt; {&lt;BR /&gt; docs[i].remove();&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the&amp;nbsp;contentstore was&amp;nbsp;empty, I emptied trashcan too.&lt;/P&gt;&lt;P&gt;So the trashcan is absolutely empty.&lt;/P&gt;&lt;P&gt;The Alfresco instance is nearly clean, but the &lt;SPAN&gt;contentstore on file system is still of 2GB size.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How is it possible to remove unused content from repository on file system?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Alfresco Community (Build: 201612)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Sep 2018 07:56:47 GMT</pubDate>
    <dc:creator>skushnerenko</dc:creator>
    <dc:date>2018-09-04T07:56:47Z</dc:date>
    <item>
      <title>Cleaning contentstore</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cleaning-contentstore/m-p/70670#M23151</link>
      <description>I have cleaned contentstore, which was about 2 GB, from user files via scriptvar docs = search.luceneSearch("PATH:\"/app:company_home/cm:main//*\" AND TYPE:\"doc:somecontent\"");var i; for (i=0; i&amp;lt;docs.length; i++) { docs[i].remove(); }//foldersvar docs = search.luceneSearch("PATH:\"/app:company_</description>
      <pubDate>Tue, 04 Sep 2018 07:56:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cleaning-contentstore/m-p/70670#M23151</guid>
      <dc:creator>skushnerenko</dc:creator>
      <dc:date>2018-09-04T07:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Cleaning contentstore</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cleaning-contentstore/m-p/70671#M23152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found a solution, seems like the repository is purged by special job contentStoreCleaner:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://docs.alfresco.com/4.2/concepts/clean-content.html" title="http://docs.alfresco.com/4.2/concepts/clean-content.html" rel="nofollow noopener noreferrer"&gt;Cleaning up orphaned content (purge) | Alfresco Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And it should take by default about 14 days to&amp;nbsp;purge unused content.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2018 09:17:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cleaning-contentstore/m-p/70671#M23152</guid>
      <dc:creator>skushnerenko</dc:creator>
      <dc:date>2018-09-04T09:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cleaning contentstore</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cleaning-contentstore/m-p/70672#M23153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this helps:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://i1.wp.com/blyx.com/wp-content/uploads/2014/08/Slide1.png" title="https://i1.wp.com/blyx.com/wp-content/uploads/2014/08/Slide1.png" rel="nofollow noopener noreferrer"&gt;https://i1.wp.com/blyx.com/wp-content/uploads/2014/08/Slide1.png&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Alfresco 5 you can set this parameter for reducing this protection:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;system.content.orphanProtectDays=14&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Also if you apply&amp;nbsp;&lt;STRONG&gt;sys:temporary&lt;/STRONG&gt; aspect before deleting you will bypass the thrascan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;--C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final hint: use better search.query() instead search.luceneSearch()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 19:58:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cleaning-contentstore/m-p/70672#M23153</guid>
      <dc:creator>cesarista</dc:creator>
      <dc:date>2018-09-05T19:58:29Z</dc:date>
    </item>
  </channel>
</rss>

