Overview
When attempting to delete a folder with large numbers of files in OneDrive, or SharePoint Online, you may run into this error message:
The attempted operation is prohibited because it exceeds the list view threshold.
Here is an example error message attempting to delete the "common_files" folder on a SharePoint Online Document Library.
Resolution
The easiest method is to go into the affected folder in a web browser and select all sub files and folders and select delete. If there are errors, reload the page and select all folders again and continue to delete until the folder is clear or a new sub-folder presents the same "exceeds the list view threshold" error. Even with very large numbers of files this sub-folder deletion method will typically allow deletion without requiring administrative assistance.
Note: if you are still unable to delete a folder, try deleting the folder using the OneDrive Sync desktop client or escalate this to your IT Local Support Team.