none
How to get rid of old versions without deleting them one by one? RRS feed

  • Question

  • In about 50 doc libs (with drawings) we had versioning (minor and major) ON. Since this whole site becomes quit big (25 GB), I wanted to run a test on our testenvironment to set off all the versioning and check the size of the site afterwards. Now I turned off versioning in all doc libs, but nothing happens on the size of the site. So I notice that sharepoint 'keeps' all the versions, even if they're now not visible for the end-user. How can I get rid of the old versions, without 'deleting' them one by one?

    • Edited by Mike Walsh FIN Friday, May 7, 2010 9:28 AM Original Title "How to get rid of versioning" wasn't quite what you wanted. Title re-written.
    • Moved by Mike Walsh FIN Friday, May 7, 2010 9:30 AM admin q (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    Friday, May 7, 2010 8:16 AM

Answers

  • (You might have to turn versioning on again for this to work).

    Go to each doc lib in turn and change the number of versions allowed to (say) one. This will (I have read elsewhere) remove all the versions beyond the one it keeps.


    FAQ sites: (SP 2010) http://wssv4faq.mindsharp.com; (v3) http://wssv3faq.mindsharp.com and (WSS 2.0) http://wssv2faq.mindsharp.com
    Complete Book Lists (incl. foreign language) on each site.
    Friday, May 7, 2010 9:30 AM
  • HI there.

    You may do as Mike Walsh suggested. However, setting a keep version of 1 (which is the lowest) will actually keep the current version and the version before it. Also, the actual removal will not take place until the next publishing action.

    On Codeplex, I have a small utility to count versions of documents . I have now added functionality to purge all old versions. Take a look to see if that fits you requirements. To use it with multiple document libraries, you can always put a bunch of them in a .bat file and call that.

    Hope this helps.

    Regards,

    Magnus


    My blog: InsomniacGeek.com
    Friday, May 7, 2010 12:06 PM

All replies

  • (You might have to turn versioning on again for this to work).

    Go to each doc lib in turn and change the number of versions allowed to (say) one. This will (I have read elsewhere) remove all the versions beyond the one it keeps.


    FAQ sites: (SP 2010) http://wssv4faq.mindsharp.com; (v3) http://wssv3faq.mindsharp.com and (WSS 2.0) http://wssv2faq.mindsharp.com
    Complete Book Lists (incl. foreign language) on each site.
    Friday, May 7, 2010 9:30 AM
  • HI there.

    You may do as Mike Walsh suggested. However, setting a keep version of 1 (which is the lowest) will actually keep the current version and the version before it. Also, the actual removal will not take place until the next publishing action.

    On Codeplex, I have a small utility to count versions of documents . I have now added functionality to purge all old versions. Take a look to see if that fits you requirements. To use it with multiple document libraries, you can always put a bunch of them in a .bat file and call that.

    Hope this helps.

    Regards,

    Magnus


    My blog: InsomniacGeek.com
    Friday, May 7, 2010 12:06 PM
  • Hi Mike,

    It didn't work for me, I have followed below steps
    1-From versioning settings of A Document Lib I have limit the version to 1 and ideally it should remove all versions leaving 2 copy of each file but if I am uploading a new file it's ok (new versioning works) but not for files that already uploaded in this document Lib (all previous version are already there).

    Is there any way by which I can delete all versions of existing file leaving final version?


    Vishal Goyal

    Monday, March 20, 2017 8:38 AM
  • Hi Vishal,

    OOTB this is not possible.

    There is a 3rd party tool that provides this functionality. After making an inventory of a document library it lists the items with major/minor versions (and the quota consumed) and then allows the user to delete major and / or minor versions whilst keeping a fixed number of versions (e.g. keep last 2 major versions plus the current document). It is browser-based so no need to install any software. See https://collab365.directory/listing/slim-companion/

    Note I am affiliated with the vendor.

    Paul

     
    Monday, March 20, 2017 7:36 PM
  • Hi,

    I can suggest the tool DMS-Shuttle for SharePoint for these purposes. This is a migration tool, but there is also a number of bulk operations. One of them is "Bulk Delete Version History". This feature allows you to delete old versions of documents in a document library, a specific folder, or even for the entire site or site collection and leaving only the most current. For students & NGO's it is free. There is a trial version: https://dms-shuttle.com. Note: I am working for the company.

    Tuesday, May 7, 2019 9:33 AM