# Delete all items in a SharePoint list without clicking one by one

> For the full documentation index, see https://250highstreet.com/llms.txt

> Delete-all can fail on a big SharePoint list. Back up first, stop what adds the rows, delete in small batches, or use a short Power Automate flow.

Short answer: deleted SharePoint items go to the site recycle bin, and Microsoft says "For SharePoint, the retention time is 93 days." So you can restore rows after a delete. To clear a big list, turn off whatever keeps adding rows, then delete in small batches from a view, or run a short Power Automate flow with Get items and Delete item. On a big list, a single select-all delete can fail. Still make a back-up first (our advice, not a Microsoft rule).

## Why delete-all fails on a big list

A Microsoft Q&A question describes a list of more than 20,000 items where the select-all delete did not stick. After a reload, even more rows showed. The list held duplicates, and a flow had been adding them. The page gives one answer, a script. The page does not say whether it worked, and Microsoft's pages do not describe a fix for this exact case.

Here is what Microsoft does document. A list view that shows more than 5,000 items can hit the list view threshold. The threshold caps how many items one database operation can handle at once, and Microsoft says it cannot be changed in SharePoint. Microsoft's page also says filtered views with indexed columns return fewer rows, which helps you stay under the limit. For the full story, see "[SharePoint list over 5,000 items: what breaks and the fix](/guides/sharepoint-list-view-threshold/)".

Our advice, not a Microsoft rule: when a bulk delete will not finish, do not click it again and again. Work in smaller pieces.

## Step 1. Back up the list first

Our advice, not a Microsoft rule: before you start, make a copy you can open later. The recycle bin below is a second chance, and a copy is a safer one.

1.  Read "[How to back up a SharePoint list before someone wrecks it](/guides/back-up-sharepoint-list/)".
2.  Export the list to Excel and save the file where your team keeps records.
3.  Open the file and check that the row count looks right.

Microsoft's recycle bin page says: "For SharePoint, the retention time is 93 days. It begins when you delete the item from its original location." Microsoft says an item you delete from the site recycle bin goes into the site collection recycle bin, where it "stays there for the remainder of the 93 days, and then is permanently deleted." Treat the recycle bin as a second chance, not as your back-up.

## Step 2. Stop what adds rows

If rows keep coming back, deleting is wasted work. In the Microsoft Q&A case, the count grew even after the flow was stopped. The page does not say why. Our advice: look for every flow, form and import that writes to the list.

1.  Open Power Automate and go to My flows.
2.  Select a flow that writes to the list, open the menu, and choose Turn off. Microsoft's page on turning flows on or off lists these steps. Exact names may differ.
3.  Note that a flow you turn off while it runs keeps running until its pending runs finish. Wait for them to end.
4.  Repeat for each flow that touches the list. Microsoft Forms connections and Excel imports count too.

Do not delete the flows yet. Turn them off, so you can turn them back on later.

## Step 3. Decide what "all" means

Some people want to clear a list but keep its columns and views. Other people want to clear only old rows. Write down which one you need.

- Clear everything and keep the list: use the batch steps below.
- Clear old rows only: use a filtered view, so you only select the rows you want gone.
- Start fresh with a new list: you can also make a new list and retire the old one. Check what links to the old list first.

## Option A. Delete in batches from a view

This needs no code. It works best when the list is not far over 5,000 items.

1.  Make a view just for cleanup. Name it "Cleanup".
2.  Sort it by the Title column, or by Created, so the same rows come first each time.
3.  Filter it to the rows you want gone. A filter on a plain column such as Status needs no special editor. Filters with \[Today\] or \[Me\] only work in the classic view editor (Edit current view, then Filters). I also use the classic view editor for "is not equal to" filters. That part is our advice, not a Microsoft rule.
4.  Show a small page size, for example 100 items per page.
5.  Select the rows on the page and delete them.
6.  Reload the page and check that the count went down.
7.  Repeat until the view is empty.

If the count goes up again, go back to Step 2.

## Option B. Delete with a short Power Automate flow

Use this when there are too many rows for the view. The flow gets a set number of rows, then deletes each one.

1.  Create an instant flow with a manual trigger. You press the button when you are ready.
2.  Add the SharePoint action Get items. Pick your site and list.
3.  Open Advanced options and set Top Count. Microsoft's page says Get items returns 100 items by default, and that you can raise the limit up to the list view threshold of 5,000. Beyond 5,000 the page says it fails. For the whole picture, see "[Power Automate Get items stops at 100 rows: how to get them all](/guides/power-automate-get-items-only-returns-100/)".
4.  Open the action settings and turn on Pagination, with a threshold at or above your Top Count. Microsoft's page says to turn on Pagination for lists over 5,000 items when you use a filter query. Because of that known problem, our advice is to leave the Filter Query empty for this flow.
5.  Add the action Apply to each and pass in the value from Get items.
6.  Inside the loop, add the SharePoint action Delete item. Pick the same site and list, and set Id to the ID from Get items. Microsoft's connector page lists Delete item as the action that deletes an item from a SharePoint list.
7.  Save, and test on a copy of the list with a few rows.
8.  Set Top Count to a small batch, for example 1,000, run the flow, and check the count.
9.  Run it again until the list is empty.

Only the rows that Get items fetched are deleted. If Top Count and Pagination are not set, the flow touches only 100 rows. That is why you may need several runs.

Limits to know, from Microsoft's pages:

- An Apply to each loop can process 5,000 array items for the Low profile and 100,000 on all others. Check with your admin which applies to you.
- Apply to each runs one item at a time by default. You can raise it to between 1 and 50 at once. Our advice: leave it at the default for a first run. Faster is not safer.
- The SharePoint connector page lists 600 API calls per connection every 60 seconds. A flow that deletes thousands of rows can be slowed down by this.
- Microsoft's limits page says: "A cloud flow that is consistently throttled is turned off." The limit is 14 days. Big delete runs can hit this, so run in batches.

## Step 4. Check the result and turn things back on

1.  Open the list and confirm the count is zero, or matches what you kept.
2.  Open the Excel back-up and compare a few rows with what you kept.
3.  Fix the cause of the duplicates before you turn flows on again.
4.  Turn each flow back on, one at a time, and watch the list.

## Restore deleted rows from the recycle bin

Microsoft's page lists these steps:

1.  Go to the SharePoint site the items were deleted from.
2.  Open the Recycle bin from the Quick Launch bar.
3.  Select the checkbox next to each item you want to restore, then click "Restore."

Items return to the location they were deleted from. If an item is not in the site recycle bin and was deleted recently, a site collection administrator may be able to restore it from the site collection recycle bin. [If the Recycle bin link is missing, the full steps are here:](https://support.microsoft.com/en-us/office/restore-items-in-the-recycle-bin-of-a-sharepoint-site-6df466b6-55f2-4898-8d6e-c0dff851a0be)

## What to avoid

- Deleting with no back-up. Make the Excel copy first (our advice, not a Microsoft rule).
- Leaving flows on while you delete. New rows will fill the space.
- Clicking select-all again and again. If it did not work the first time, the next click will not help.
- Running the flow on the live list with no test. Use a small test list first.
- Setting Top Count above 5,000. Microsoft says the action fails past that number.
- Treating a hidden view as security. A view only changes what people see. It does not control who can delete.
- Deleting the list when you only wanted to clear it. You lose the columns and views.

## When to get help

You can build all of this yourself in Microsoft 365. If you would rather have it built and tested for your team, I do that. A tracker like this is a fixed price: \$5,000 for one, built in 2 weeks. See "[What a SharePoint tracker costs to build](/guides/what-a-sharepoint-tracker-costs/)". Bring one example of the problem to a free call.

I am Al Davies. I run 250 High Street LLC and build SharePoint trackers and Power Automate flows for operations teams. I work remotely. The first call is free, and I will not try to sell you anything.

See trackers I built: [Tools I built](/portfolio/)

## FAQ

### Why does Delete all not work on my SharePoint list?

Microsoft's pages do not describe a fix for that exact case. They do describe a 5,000 item list view threshold that limits big operations. One Microsoft Q&A question shows a list over 20,000 items where select-all delete did not stick. Delete in smaller batches, or use a flow.

### Can I get deleted rows back?

Yes. Microsoft's page says deleted items go to the site recycle bin and are kept for 93 days from the day they were first deleted. Select them in the Recycle bin and click Restore.

### How many rows can a flow delete in one run?

It depends on Top Count. Get items returns 100 rows by default, and Microsoft says you can raise it to 5,000. The loop limit is 5,000 items for the Low profile and 100,000 on others. Our advice: run batches of about 1,000 and repeat.

### Should I delete the list and make a new one?

Only if you do not need the columns, views, forms and links. Clearing the rows keeps all of that. Check what points to the old list before you remove it.

### Does restoring work on a whole list?

Microsoft's page covers restoring items you select with checkboxes. It does not describe a one-click restore of a whole list's rows.

## Sources

- [Microsoft Q&A, Microsoft List - Unable to delete lines using delete all items](https://learn.microsoft.com/en-us/answers/questions/5430682/microsoft-list-unable-to-delete-lines-using-delete)
- [Manage large lists and libraries in SharePoint](https://support.microsoft.com/en-us/office/manage-large-lists-and-libraries-in-sharepoint-b8588dae-9387-48c2-9248-c24122f07c59)
- [Microsoft Support, Restore items in the recycle bin of a SharePoint site](https://support.microsoft.com/en-us/office/restore-items-in-the-recycle-bin-of-a-sharepoint-site-6df466b6-55f2-4898-8d6e-c0dff851a0be)
- [Turn a flow on or off, and delete a flow](https://learn.microsoft.com/en-us/power-automate/disable-flow)
- [In-depth analysis into Get items and Get files](https://learn.microsoft.com/en-us/sharepoint/dev/business-apps/power-automate/guidance/working-with-get-items-and-get-files)
- [SharePoint connector](https://learn.microsoft.com/en-us/connectors/sharepointonline/)
- [Limits of automated, scheduled, and instant flows](https://learn.microsoft.com/en-us/power-automate/limits-and-config)

## Related guides

- [Planner: Delete this plan is greyed out](/guides/planner-delete-plan-greyed-out/)
- [My SharePoint list view does not show all items](/guides/sharepoint-list-view-not-showing-all-items/)
- [SharePoint list filter not showing all values: what to check](/guides/sharepoint-list-filter-not-showing-all-values/)

Source: https://250highstreet.com/guides/sharepoint-list-delete-all-items/
