In Power Automate, I received a requirement to delete all items from a SharePoint list. This can be useful when you need to clear out a list quickly, such as for resetting test data records that are no longer required.
In this article, I will explain how to delete all items in the SharePoint list using Power Automate. Additionally, I worked on scenarios where I needed to delete specific items based on a date, such as removing all items older than a specific date.
Delete All Items in the SharePoint List Using Power Automate
For this example, I created a SharePoint list called Issue Tracker with the below column:
| Column | Data Types |
|---|---|
| Issue ID | Number |
| Issue | Single line of text (Title) |
| Issue Description | Multiple lines of text |
| Issue Status | Choice |
| Issue Registered Date | Date and time |
| Issue Assigned To | Person or Group |
| Issue Faced by Department | Choice |

Now follow the below steps:
1. In the Power Automate, click the Instant Cloud flow, enter the Flow name, and choose the trigger flow (i.e., manually trigger a flow).

2. Then add a Get items action to retrieve all items present in the SharePoint list and provide the following parameters:
- Site Address: Select the SharePoint site address.
- List Name: Select the name of the SharePoint list from which you want to delete items.

3. Next, add the Delete item action, which is to delete all the items in the SharePoint list and provide the below parameters:
- Site Address: Select the SharePoint site address.
- List Name: Select the name of the SharePoint list from which you want to delete items.
- ID: Id from the dynamic content of the Get items.
Then, it will automatically add apply to each action.

Run the Flow to Delete All Items in the SharePoint List
Now, it’s time to save the flow. Click on Test -> Select Manually -> click Test. After the flow runs successfully, go to the SharePoint list, and you will see that all SharePoint list items get deleted and the list gets empty.

This way, you can delete all items in the SharePoint list using Power Automate.
Delete all items in the SharePoint list based on condition Using Power Automate
For this example, I use the same SharePoint list as above, but you can add some items that have been changed to the SharePoint list.

I want to delete all items where the Issue Status value is close. To do this, follow the below steps.
I am using the above flow here. Now, edit the existing flow and select the action to get items.

Next, click Advanced Parameters and select the Filter Query. Inside the filter query, provide the below parameter:
IssueStatus eq 'Close'- IssueStatus: Internal name of that column
- eq: This is a comparison operator that stands for equals
- Close: This is the value we are comparing
So, the filter IssueStatus eq ‘Close’ will retrieve all records or items where the IssueStatus field has the value “Close.”
Now save the flow and Click Test -> Select Manually -> Click Test. After the flow runs successfully, go to the SharePoint list, and you will see that the items with Issue Status set to Close have been deleted.

Delete all items in a SharePoint list based on date using Power Automate
For this example, I created a SharePoint list named Event Details, which contains information about various events, including their dates. To keep the list up-to-date, you want to automatically delete any event older than 2 days from the current date.

Now follow the below steps:
1. Navigate to the Power Automate Home page, click + Create, and select the Scheduled Cloud Flow. Then provide the following information:
- Starting: Provide on which date you want to run your flow.
- at: Provide the time you want to run the flow, in my case, at 10:00 AM.
- Repeat every: We want to run the flow daily.

2. Then add a Get items action to retrieve all items present in the SharePoint list and provide the following parameters:
- Site Address: Select the SharePoint site address.
- List Name: Select the name of the SharePoint list from which you want to delete items.

3. Next, click Advanced Parameters and select the Filter Query. Inside the filter query, provide the below parameter:
EventDate le '@{adddays(utcnow(),-2,'yyyy/MM/dd')}'
4. Next, add the Delete item action to remove all the items in the SharePoint list and provide the following parameters:
- Site Address: Select the SharePoint site address.
- List Name: Select the name of the SharePoint list from which you want to delete items.
- ID: Use the ID from the dynamic content of the Get items action.
This will automatically add an Apply to each action.

Run the Flow to Delete All Items in a SharePoint List Based on Date
Now click on Save and run the flow manually; you can see all items before two days are deleted.

I hope you followed all the steps in this tutorial. I covered how to delete items from a SharePoint list using Power Automate in various scenarios: deleting all items in a list, removing items based on a specific condition, such as the Issue Status being set to Closed, and deleting items older than a specific date, such as events older than two days.
Related Power Automate tutorials:
- Delete Files Older than 3 Years from SharePoint Document Library Using Power Automate
- Get Current Year in Power Automate
- Delete all rows from a SharePoint Online list using Power Automate
- Power Automate delete file from SharePoint

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.
Thanks for sharing your knowledge, God bless!