4 Replies Latest reply on Jan 3, 2019 5:06 AM by panikal

    Mass deleting older versions of a document


      Wondering if anyone has dealt with this before....Is there anyway to mass delete the older versions of a document?  We have an older document that has several thousand versions and they are taking forever to load when you want to compare versions.  I just deleted the first version and it took 60 seconds to delete and reload.  Since there are 2200+ versions, the one at a time method will take way too long.

        • Re: Mass deleting older versions of a document

          Hi Lyndsay,


          how did you manage to delete a version? we try it in our company, but do not see where we can delete versions of a document...


          thanks for your feedback

            • Re: Mass deleting older versions of a document
              Alex Nassi

              Gunther Payne There is a "Manage Versions" option under the "Actions" menu which opens a screen where you can see additional details about the different versions, including a "Delete" option

              2 people found this helpful
                • Re: Mass deleting older versions of a document
                  Nik Edmiidz

                  I'm pretty sure that was the method Lyndsay was using which took 60 seconds per version. She was asking for a better method that could help save time particularly for mass deletion.

                    • Re: Mass deleting older versions of a document

                      There are four ways to do this that I've discovered (after an automated task created 10,000 versions of a document)..


                      1. delete each version by hand, which for 2000 versions will take a week (if you're that patient), though the speed should get better after each deletion

                      2. copy the current version to a new document, then delete the old document. Only problem is the DOC-ID changes so hard-links and widgets/etc will need to be  manually updated (what I ended up doing since i had no hard links)

                      3. use the REST API - DELETE /api/core/v3/versions/<CONTENT_ID>/<VERSION_ID>, repeat 2000 times for each version_id (or get your IT person to write a quick script)

                      4. delete all previous version from the DB table jivedocversion (delete from jivedocversion where internaldocid=<insert_your_doc_ID_here> and versionid!=<version_to_keep>) (may require a restart, definitely requires you to dump caches). I've done this method in the past as well and all should be OK in theory so make sure you do this right after you create a backup, or at least backup the SQL that you delete.

                      2 people found this helpful