Hi Christophe Cervello (FLAIR-IT),
Thanks for reaching out to the Microsoft Q&A forum.
I understand you're having trouble deleting an old version of a file in SharePoint because it's on hold. It can be quite challenging when you're managing site content and run into these blockers.
Based on your description, your situation likely falls under one of the scenarios detailed in this Microsoft Learn article: An invalid policy blocks a SharePoint site deletion - SharePoint | Microsoft Learn
To assist you in resolving this, you can run a diagnostic test in the Microsoft 365 admin center. This test will help verify if there's an invalid retention policy or if an eDiscovery hold is still within its grace period.
Here are the steps to follow:
Run Diagnostic Test
- Select the Run Tests: Invalid Retention or grace eDiscovery Hold button to populate the associated test in the Microsoft 365 admin center: Run Tests: Invalid Retention or grace eDiscovery Hold
- In the Run diagnostics section, either type or copy and paste the URL of the SharePoint or OneDrive site that you want to delete.
- Select Run Tests.
Based on Test Results
- If the test finds an invalid retention policy: You can choose to remove the policy using the Remove-RetentionPolicy cmdlet. You can find more details here: Remove-RetentionPolicy (ExchangePowerShell) | Microsoft Learn.
- If the test finds that the eDiscovery hold is within the 30-day grace period: ou can choose to remove the hold using the Invoke-HoldRemovalAction cmdlet. Refer to this example for details: Invoke-HoldRemovalAction (ExchangePowerShell) | Microsoft Learn - Example 2.
I hope the above information gives you some clarity and points you in the right direction. If you run into any problems or have more questions, please feel free to reply to my answer.
---------------------------------------
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.