How to Fix Unable to Delete a Folder in SharePoint or Teams
Question details
Users, including site owners, are unable to delete folders in SharePoint or Teams document libraries and may encounter file-not-found errors when using PowerShell commands.
- Product
- Microsoft SharePoint and Teams
- Device & OS
- not provided
- Scenario
- Attempting to delete a folder via the web interface or using the Remove-PnPFolder PowerShell command.
- Observed behavior
- Folder deletion fails in the user interface, and PowerShell scripts return file-not-found errors due to path issues.
Verify that you have site owner or member permissions and ensure no files within the target folder are checked out or currently open by other users.
Move the Folder Before Deleting
Moving the stubborn folder to a new location within the library often resolves hidden permission or sync glitches preventing deletion.
SharePoint occasionally encounters synchronization locks on folders. Moving the folder forces the system to update the file path and metadata, frequently clearing the error that blocks deletion.
Navigate to your SharePoint or Teams document library, click on 'New', and select 'Folder' to create a temporary directory.
Right-click the folder you are unable to delete, select 'Move to', and choose the newly created temporary folder as the destination.
Once the folder has been successfully moved, right-click the temporary parent folder and select 'Delete' to remove both.

Verify Channel Isolation and Permissions
Test whether the deletion issue is isolated to a specific channel, user, or site configuration.
Troubleshoot Remove-PnPFolder PowerShell Errors
Fix file-not-found errors when using PowerShell scripts to force-delete SharePoint folders.
Simplify Document Management with WPS Office
While resolving complex SharePoint or Teams folder errors can be tedious, finding a reliable suite for creating and managing your documents shouldn't be. WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office, ensuring your workflow remains uninterrupted.
- 1. Download the software: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install and launch: Run the lightweight installation file and follow the on-screen prompts to set up the office suite in minutes.
- 3. Manage documents seamlessly: Open your existing Microsoft Office files directly in WPS Office and save them to WPS Cloud for organized, hassle-free document management.

Frequently Asked Questions
Why can't I delete a folder in SharePoint even if I am the site owner?
This can happen if a file inside the folder is currently checked out by another user, has an active retention policy applied, or if there is a temporary server synchronization glitch preventing the deletion.
What does 'file not found' mean when using Remove-PnPFolder?
This PowerShell error typically indicates that the folder path provided in your script is incorrect. Ensure you are providing a site-relative path rather than a full absolute web URL.
Can Microsoft Teams retention policies prevent folder deletion?
Yes. If a retention policy or a legal hold is applied to your SharePoint site or the files within the folder, the system will block any deletion attempts to maintain compliance with the policy.
How do I force delete a stubborn folder in SharePoint?
You can attempt to bypass interface glitches by moving the stubborn folder into a newly created temporary folder and then deleting the temporary folder, or by using PowerShell commands with the correct site-relative path.




