4 Replies Latest reply on Jul 8, 2015 3:41 AM by Jochen Kraushaar

    How to delete all versions of a versionable node?

    Jochen Kraushaar Newbie

      Hi there,


      I have a versionable nt:file node. The parents of the node are not versionable.


      When I delete the node, the nodes stored in jcr:system/jcr:versionStorage are still available. I cannot access these information using the Versioning API getVersionHistory method (PathNotFoundException). I can access it by navigating to the jcr:system/jcr:versionStorage nodes, but they are protected. So I have no chance to delete those information after removing the node.


      Even if I delete all versions of a versionable node before deleting the node, jcr:system/jcr:versionStorage still contains data (the root version).


      This is especially a problem when it comes to files: The binaries are never marked as unused as there are still references to them. (I did not find a way to reduce the refCount value to 0, yet.)


      Is there any chance to delete all versions of a versionable node when the node is deleted or to throw away all data in jcr:system/jcr:versionStorage which is no longer accessable through the API?