How to Configure SharePoint Online Version Limits and Delete Old Versions
Question details
Users need to know how to configure document version limits in SharePoint Online, enforce the deletion of older file versions, and understand the expected timeframe for these background deletion processes to complete.
- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- A user has set a version limit to 100 in SharePoint Online but notices that older versions are not removed immediately after 24 hours.
- Observed behavior
- SharePoint version trimming is a background process taking up to 48 hours. Old versions are not deleted instantly and may be retained longer due to legal holds, retention policies, or requiring the file to be updated first.
Ensure you have SharePoint Administrator privileges to run management PowerShell commands, and verify that there are no active retention policies or legal holds that would prevent file deletion.
Check the Status of the Version Policy Job
Use this solution to verify if the automated background version trimming process is still running or stuck.
SharePoint Online processes version trimming in the background. It is entirely normal for this process to take up to 48 hours after you configure your version limits. Furthermore, versions exceeding count limits are often removed gradually as files are actively updated by users.
Launch the SharePoint Online Management Shell as an administrator on your computer.
Execute the command: Get-SPOSiteVersionPolicyJobProgress -Identity $siteUrl (replacing $siteUrl with your actual site URL).
If older versions are still present after 24 hours, allow additional processing time (up to 48 hours) for the background job to finish.
Manually Trigger Batch Deletion for Older Versions
Use specific PowerShell commands to manually force the deletion of older versions if appropriate for your administrative scenario.
Looking for a Simpler Way to Manage Documents? Try WPS Office
If managing complex SharePoint version histories and PowerShell scripts is slowing down your workflow, consider WPS Office. It provides a lightweight, highly compatible alternative to Microsoft Office, featuring intuitive version history management and seamless cloud storage out of the box.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package.
- 2. Install the Software: Run the installer and follow the on-screen instructions to complete the setup.
- 3. Manage Files and Versions: Open your documents and easily track or restore previous file versions via the built-in backup and cloud features.

Frequently Asked Questions
Why aren't older SharePoint versions deleted immediately after changing the version limit?
SharePoint version trimming is a background operation that can take up to 48 hours to complete. In many cases, versions exceeding the limit are only gradually removed as the respective files are opened and updated.
Do retention policies override version limits in SharePoint?
Yes. Microsoft 365 retention policies and legal holds always take precedence over standard version limits. If a file is subject to a hold or retention rule, its older versions will not be deleted.
What should I do if the version deletion job is stuck for days?
First, check the job status using the Get-SPOSiteVersionPolicyJobProgress command. If there is no progress after 48 hours and manual commands like New-SPOSiteFileVersionBatchDeleteJob do not resolve the issue, you should contact Microsoft Support.




