51 votes

This package is marked as retired

This package has been flagged as retired by the package owner. Continue to use at your own risk



This package automaticaly removes any previous versions for those times when a version history aren't important, and you don't want to take up the database space.

With Umbraco being such a versatile platform, it's very easy to develop small scale apps that go beyond the regular "Content" paradim. In some situations, version history becomes unimportant, and a waste, so this package automaticaly cleans up any previous versions when a new version is published.


The package is configured via an unVersion.config file located in the default umbraco config folder.

To define a new unversion rule, create an add element with the following attributes.

docTypeAlias [Optional] - The doc type alias of the documents to be unversioned, if undefined, applies to all (If you don't define docTypeAlias, it is advised you define rootXpath to narrow down the scope of the unversion).

rootXpath [Optional] - An xpath statment to define the root folder for the unversion rule, ie: //NewsIndex

maxDays [Optional] - The maximum number of days to keep versions. If attribute is not present, defaults to int.MaxValue (Pre v2.0 defaults to 0, so bare this in mind).

maxCount [Optional] - The maximum number of latest versions to keep. If attribute is not present, defaults to int.MaxValue (Pre v2.0 defaults to 0, so bare this in mind).


1.2.0 - Umbraco 4.5 compatable

1.2.1 - Added maxDays attribute

1.2.2 - Added maxCount attriute

1.3 - Umbraco 4.6 (SQL CE 4) compatable

1.4 - Fixed date comparison issue

1.5 - Event handler now checks for HttpContext before commencing

2.0 - Rewritten for Version 7. With this update, maxDays and maxCount are now dependant on each other, so a version must fall within both boundaries to be kept. In previous versions of the package, a node was kept if it was within either one. Because of this update, both properties now default to int.MaxValue if no attribute is defined.

2.1 - Merged in pull request #1 to stop errors on larger sites due to db connection being left undisposed.

3.0 - Umbraco 8.4+ compatible


Please raise any issues on the forum below. All feedback is welcome and appreciated.


 Download package
version 3.0.0

NuGet install instructions for Umbraco 7.1.0-8.18.13

Install-Package Our.Umbraco.UnVersion

Package owner

Søren Kottal

Søren Kottal

Søren has 4405 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions: 8.10.x, 8.6.x, 8.5.x, 8.4.x, 7.14.x, 7.12.x, 7.9.x, 7.5.x, 7.2.x, 7.1.x

Package Information

  • Package owner: Søren Kottal
  • Created: 14/06/2010
  • Current version 3.0.0
  • .NET version 4.0,4.7.2
  • License MIT
  • Downloads on Our: 8.2K
  • Downloads on NuGet: 77.2K
  • Total downloads : 85.4K