How to Fast Delete Over 150,000 SharePoint Workflow Items
Question details
The user needs a fast, reliable method to delete hundreds of thousands of SharePoint workflow history items without triggering system errors.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Performing large-scale cleanup of a SharePoint workflow history list that has accumulated over 150,000 records.
- Observed behavior
- Standard one-at-a-time item deletion is blocked or heavily slowed down by the SharePoint list view threshold and server request throttling.
Navigate to your SharePoint List Settings and create an indexed column for 'Created' or 'Modified' so your deletion scripts can successfully bypass the 5,000-item List View Threshold.
Use PnP PowerShell with Batch Deletions
The most efficient administrative method to handle massive item deletions using batched operations to avoid throttling.
PnP PowerShell allows administrators to group multiple commands into a single batch. By querying indexed columns in smaller pages, you can safely remove massive datasets without overloading the SharePoint server.
Open PowerShell as an administrator and connect to your site environment using the command: Connect-PnPOnline -Url <YourSiteURL> -Interactive.
Set up an indexed filter query based on your 'Created' column to retrieve list items in manageable pages (for example, 1,000 items per page) to avoid threshold blocks.
Initialize a new batch using $batch = New-PnPBatch. Iterate through your retrieved items and queue them by running Remove-PnPListItem -List <ListName> -Identity $item.Id -Batch $batch.
Run the command Invoke-PnPBatch -Batch $batch. Monitor the output closely to ensure the operations execute successfully.

Utilize Power Automate with SharePoint REST $batch Endpoint
A low-code alternative utilizing cloud flows and the REST API to delete items without needing PowerShell access.
Discover WPS Office for Seamless Document Management
While managing massive SharePoint lists requires specialized admin tools, handling your daily documents shouldn't be a hassle. WPS Office provides a lightweight, highly compatible alternative to Microsoft Office, allowing you to edit, share, and collaborate on documents effortlessly.
- 1. Download the Installer: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install and Sign In: Follow the on-screen instructions to install the software, then sign in to sync your files across devices.
- 3. Open Office Documents: Double-click any existing Word, Excel, or PowerPoint file to open and edit it natively in WPS Office.

Frequently Asked Questions
Why can't I just delete the entire SharePoint workflow history list?
Deleting the entire history list can break active workflows and cause severe reference errors in your SharePoint environment. It is strongly recommended to empty the list's contents rather than destroying the list structure itself.
What is the SharePoint list view threshold?
The list view threshold is a strict performance limit set to 5,000 items. If a query or deletion operation exceeds this limit without using indexed columns, SharePoint blocks the action to prevent server performance degradation.
Can I increase the list view threshold to delete these items easily?
Only on-premises farm administrators can modify the list view threshold, though doing so is discouraged as it degrades database performance. In SharePoint Online, this limit is hardcoded and cannot be changed by any user.




