Sitecore Version Pruner

  0 rating
11/28/2012 8:16:28 AM
4/17/2015 1:39:08 PM
Source: GitHub


The module is pretty simple. Basically, it is just a scheduled task that you can configure to remove old/unused versions from your content tree. Additionally, if you choose, you can preserve removed item versions in 2 ways:

  • Archiving Versions
  • Item Serialization

Archiving Versions

This method will archive item versions that meet the rule requirements you set to your Archive DB. You can then recover them as necessary using the Archive UI in Sitecore Desktop. As of Sitecore 6.6+, this is the preferred option. I have also made this the default. 

For more info, read the comments on John West's  post "Remove Old Versions of Items in the Sitecore ASP.NET CMS".

Item Serialization

This method is a tweaked version of the approach used by Version Manager module, where the item is stored under:


The main difference here is that I modified the XML file naming slightly to allow for broken ranges of archived versions. Since with this tool, it would be possible that versions 1-4, 6, 8-10 were removed but NOT versions 5 or 7 if they had been updated recently. So you'd end up with a file name like: Versions_1-4_6_8-10.item

Archiving for Sitecore 6.5 users..

Unfortunately, archiving an individual version is not supported in 6.5. In "Version Pruner Module 1.2" I ported version archiving code from 6.6 to get it working. It works but make sure you understand its usage. 


  • Documentation > Installation Configuration
    Installation & Configuration
    • Install the appropriate Sitecore package
    • In Content Editor, navigate to: /sitecore/System/Tasks/Commands/Run Version Pruner
    • Set the "Root" field to the item from which to start pruning versions. Change other fields as required.
    • In Content Editor, navigate to: /sitecore/System/Tasks/Schedules/Version Pruner Schedule
    • Modify the "Schedule" field to your desired run scheduled. Use the Sitecore Shell Wax module to get a better UI for this field.
  • Documentation > Run Version Pruner Command
    'Run Version Pruner' Command

    • Database - the Sitecore database in which to execute the task
    • Disable Indexing While Processing - temporarily disables Lucene indexing while the task is running
    • Root - the item from which to start pruning
    • Item Filter - this rule defines which items qualify for pruning
    • Version Filter - this rule defines which item versions of an item should be pruned and whether they are preserved (archived/serialized)
    • Serialization Root Folder - This is the name of the folder to serialize items to
Release notes
1.0 - Initial Release
Read more Back
Code examples

Solution screenshots(0)


Reviews (0)

Sort by: Date Most votes
  • Profile Avatar

    Level: 0

    x0 x0 x0




    Was this helpful?


Comments (0)

Sort by: Date  Most votes

Leave a Comment

Comment must be field in
Post comment

Write a review

Title can't be empty
Review can't be empty
Post review


Title Description Download Action

Add File