Share via

I am unable to delete all the files in my OneDrive recycle bin at once. Only a small subset.

Duncan 0 Reputation points
2026-03-12T18:10:33.1966667+00:00

I have a script which has been capturing photos every 10s to create timelapse movies every day.

I also have a script to remove all the .jpgs older than 1 month which works - but it puts them in the OneDrive recycle bin.

But, if you go to OneDrive and chose 'empty recycle bin' it only empties what is displayed on the page, which is maybe 100 files. There are 8460 per day!

There appears to be no way to delete 10s of thousands of files - which is a real problem as my 1TB of space is 95% full...

Microsoft 365 and Office | OneDrive | For business | Other
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Craig Long 17,705 Reputation points
    2026-03-12T20:15:54.66+00:00

    If you scroll down to the last file in the recycle bin and select it while holding down the shift key, you might be able to tick all the files in the recycle bin.

    0 comments No comments

  2. Craig Long 17,705 Reputation points
    2026-03-12T19:47:29.6966667+00:00

    Perhaps you should not be syncing your Pictures folder to OneDrive if those .jpgs are stored there. OneDrive is probably not a good place to keep these files. They need to be zipped into a compressed archive, then placed in OneDrive.

    0 comments No comments

  3. Marcin Policht 82,360 Reputation points MVP Volunteer Moderator
    2026-03-12T18:15:02.2633333+00:00

    Try using PowerShell. As per https://www.sharepointdiary.com/2019/04/empty-recycle-bin-onedrive-for-business-powershell.html

    When you have more than 5000 items in your recycle bin, both the UI method and PowerShell above may fail with the “Threshold exceeded” error message. So, Here is how to clear recycle bin items in batches:

    # Install the module if not already installed
    # Install-Module PnP.PowerShell
    
    # Set your user URL and credentials
    $siteUrl = "https://tenant-my.sharepoint.com/personal/username_domain_com"
    Connect-PnPOnline -Url $siteUrl -Interactive
    
    # Clear the entire recycle bin (1st and 2nd stage)
    Clear-PnPRecycleBinItem -All -Force
    
    

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.


  4. Q&A Assist
    2026-03-12T18:10:53.6233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    OneDrive recycle bin bulk deletion is limited in the mobile apps and in some views, but large-scale deletion is supported via the web interface and by fully emptying the recycle bin rather than only deleting visible items.

    To clear very large numbers of items:

    1. Open the OneDrive web interface
      • Go to the OneDrive website (for work/school or personal as appropriate) and sign in with the same account that owns the photos.
    2. Open the Recycle Bin
      • In the left navigation, select Recycle bin.
    3. Use the full “Empty recycle bin” action
      • In the Recycle Bin view, use the Empty recycle bin command (not just selecting the currently listed items and deleting them).
      • This command is designed to clear all items in the recycle bin, not only those shown on the current page.

    If using mobile apps (Android/iOS), there are per-operation limits:

    • Android/iOS OneDrive apps only allow deleting a limited number of files at once from normal folders (200 on Android, 20 on iOS). For very large numbers of files, the documentation explicitly directs users to use the OneDrive web site instead.

    After emptying the recycle bin, there can be a short delay before the freed space is reflected in the storage quota.

    If deletion still appears partial, check for:

    • Retention policies or labels on a OneDrive for Business/SharePoint-backed library, which can prevent some items or folders from being deleted until retention conditions are met.

    References:


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.