I am trying to delete a SharePoint Online recycle with more than 1,000,000 list items in it.

Clear-PNPrecycleBinItem -URL $siteURL

It is throwing an error on the limit of 5000 list item threshold.

Even Get-... isn't working.

Any ideas/suggestions?


As the error message says, we have 5000 as the hard limit for list view threshold in SharePoint online. Unlike SharePoint on-premises, this threshold limit can't be increased.

Solution: empty list items in batch by using CSOM method.

SharePoint Online: How to Get All List Items from Large Lists ( >5000 Items):


SharePoint Online: Empty Recycle Bin using PowerShell:


  • Hi Lisa. Thanks for this answer but this doesn't seems to work. Somehow I'm not capable to combine those two scripts into one. – Emiel Sep 9 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.