Dear Richard Coupland,
Good day! Thank you for posting to Microsoft Community. I am happy to help you.
Based on your description, I understand your concern. It seems that you have found a way to delete versions, but only one file at a time, which is not feasible for thousands of files. You’d like to know: How to bulk delete versions of files in a folder to free up storage. And how to prevent excessive versioning in the future.
Answer 1: Unfortunately, you have to do it file-by-file, there is no UI option to delete the old versions of bulk files from OneDrive.
To delete versions of files in a folder:
Step 1: Please go to OneDrive > OneDrive settings > More settings > scroll down Under Feature and storage > select Storage Metrics > select documents or choose your desire folder
Note: you can immediately see which folder consumes the most space. Actually, all your data is in the Documents folder.
Step 2: By clicking the folder names, you can dive deeper and see subfolders and files. To check the versions, you can click the Version History link on file level:
Step 3: By clicking the Delete All Versions link you can get rid of the old versions:
Answer 2: Preventing Excessive Versioning: To prevent excessive versioning in the future, you can Firstly, install SharePoint Online Management Shell, open it as administrator.
- Enter connect-sposervice and then enter the url of your SharePoint Admin Center. When a box pops up, enter your Microsoft 365 admin account and password.
- Run the command Set-SPOTenant -EnableMinimumVersionRequirement $False
Note: you may need to wait for about 5 minutes for it to take effect.
After that, when you go to OneDrive > Click the settings Gear on the top right corner > choose OneDrive settings > Return to classic OneDrive > On the tab select LIBRARY > Choose Library Settings > Under general settings choose Versioning Settings > scroll down and find "No versioning" option, select it and click OK.
Secondly, the Versioning settings link leads to the page where you can disable versioning or limit the number of versions retained.
Note: however, that turning off versioning here does not delete the existing versions of your files!
For more details, please follow the thread: Version history fills oneDrive - Microsoft Community
If you have any further questions or need additional assistance, please don’t hesitate to reach out.
Have a nice day!
Best regards,