logo
search
Version History Issues

How to Delete Existing SharePoint File Versions Older Than Six Months

Adam DavisAdam Davis Sep 25, 2026 869 views

Question details

The user needs a method to bulk delete existing file versions in SharePoint that are older than six months.

How to Delete Existing SharePoint File Versions Older Than Six Months
Product
SharePoint Online
Device & OS
not provided
Scenario
An organization has implemented a new version expiration policy to retain file versions for six months, but requires a way to retrospectively remove old, existing document versions that currently occupy storage.
Observed behavior
While the retention policy handles new versions, the existing versions created before the policy enforcement remain in the system and require administrative intervention to be removed.
Before you start

Ensure that you have SharePoint Administrator privileges, have the latest SharePoint Online Management Shell installed, and that your tenant has access to the version history controls preview.

Solution 1Recommended

Use SharePoint Online PowerShell for Batch Deletion

Execute a batch deletion job via PowerShell to automatically identify and delete all file versions older than 180 days across a specified SharePoint site.

While there is no general built-in GUI option for this specific retrospective cleanup, Microsoft provides PowerShell cmdlets for tenants participating in the version history controls preview.

Using the batch delete job ensures the operation runs efficiently on the backend without requiring manual intervention for individual files.

1
Open SharePoint Online Management Shell

Launch the SharePoint Online Management Shell on your computer with Administrator privileges.

2
Connect to SharePoint Online

Run the command 'Connect-SPOService -Url https://yourtenant-admin.sharepoint.com' and authenticate with your global or SharePoint admin credentials.

3
Create the Batch Deletion Job

Execute 'New-SPOSiteFileVersionBatchDeleteJob -Identity https://yourtenant.sharepoint.com/sites/yoursite -DeleteOlderThanDays 180' to initiate the removal of versions older than six months.

4
Monitor Job Progress

Check the status of your deletion job by running 'Get-SPOSiteFileVersionBatchDeleteJob -Identity https://yourtenant.sharepoint.com/sites/yoursite'.

Use SharePoint Online PowerShell for Batch Deletion
Feature Availability: The availability of these cmdlets depends on your tenant's rollout status and preview access. If the commands are unrecognized, your tenant may not have the feature enabled yet.
Free Microsoft Office alternative

Looking for a Simpler Way to Manage File Versions? Try WPS Office

Managing complex SharePoint server scripts and version controls can be overwhelming. WPS Office provides a free, lightweight, and user-friendly alternative with an intuitive cloud-based version history system that requires zero coding or administrative PowerShell scripts.

  1. 1. Download and Install: Download WPS Office for free and install it on your device.
  2. 2. Save to WPS Cloud: Create or open a document and save it directly to your WPS Cloud space.
  3. 3. Manage Versions Visually: Click on 'History' from the top menu to visually preview, manage, or restore past versions without typing any commands.
Completely free and lightweight Office suiteHighly compatible with Microsoft Word, Excel, and PowerPoint formatsBuilt-in, intuitive cloud version history managementUser-friendly interface that avoids complex administrative scripts
microsoft office alternative - wps office

Frequently Asked Questions

Why didn't my new 6-month version expiration policy delete existing old versions automatically?

SharePoint expiration policies primarily dictate the retention limits for versions moving forward. To clean up existing file versions that pre-date the policy application, a retrospective batch deletion process is often necessary.

Can I recover the document versions deleted by the PowerShell batch job?

Generally, versions removed using the batch delete job are permanently deleted to free up storage space and bypass the standard site recycle bin. Always ensure you have appropriate backups before running deletion scripts.

Is there a way to bulk delete existing SharePoint versions without using PowerShell?

Currently, SharePoint Online does not offer a native Graphical User Interface (GUI) button to mass-delete historic versions across an entire site. PowerShell remains the Microsoft-recommended method for bulk administrative storage management.

What permissions are required to run SPOSiteFileVersionBatchDeleteJob?

You must hold SharePoint Administrator or Global Administrator privileges within your Microsoft 365 tenant to successfully connect to SPOService and execute batch deletion jobs.