When you try to delete a folder in SharePoint, you may see an error message stating that the folder cannot be deleted because it contains checked out files. This error prevents you from removing the folder even if you are the site owner or have full control permissions. The root cause is that SharePoint locks files that are checked out to prevent data loss or overwriting. This article explains why this lock occurs and provides step-by-step instructions to locate and check in the files so you can delete the folder.
Key Takeaways: Fixing the Checked Out File Block on Folder Deletion
- SharePoint folder deletion error: The folder contains one or more files that are checked out by a user, which blocks the delete action.
- Library Settings > Manage checked out files: Use this hidden menu to view and check in all checked out files in a library at once.
- Site owner check-in override: Site owners can check in files that were checked out by other users using the Manage checked out files feature.
Why SharePoint Blocks Folder Deletion When Files Are Checked Out
SharePoint uses a check-out and check-in system to prevent multiple users from editing the same file at the same time. When a user checks out a file, SharePoint creates a temporary lock on that file. The lock marks the file as exclusive to that user. While checked out, no other user can edit or delete the file. This lock extends to any parent folder that contains the checked out file. SharePoint blocks folder deletion because deleting the folder would also delete the checked out file, which could cause data loss or version conflicts.
The error message appears when you try to delete a folder through the SharePoint web interface, Windows File Explorer, or OneDrive sync. The message reads: “The folder cannot be deleted because it contains items that are checked out.” The folder remains undeletable until every checked out file inside it is checked in or the checkout is discarded.
The Role of the Check-Out Lock
The check-out lock is not a file permission lock. It is a version control lock. Even users with full control or site owner permissions cannot bypass the lock by overriding permissions. The only way to remove the lock is to check in the file or discard the checkout. The user who checked out the file can perform these actions. Site owners can also check in files on behalf of other users using a specific library management feature.
Steps to Check In Files and Delete the Folder
Follow these steps to locate all checked out files inside the folder, check them in, and then delete the folder. These steps require at least edit permissions on the library.
- Open the document library that contains the folder
Navigate to the SharePoint site and open the document library where the folder is located. Do not navigate into the folder itself. - Go to Library Settings
Click the gear icon in the top right corner, then select Library settings. If you are using a modern SharePoint page, you may need to click Library in the top menu bar, then Library settings. - Open the Manage checked out files page
Under the Permissions and Management section, click Manage checked out files. This page lists every file that is currently checked out in this library. - Identify the checked out files inside your target folder
Review the list. Each row shows the file name, the user who checked it out, and the path. Look for files whose path includes the folder you want to delete. - Check in all files from that folder
Select the checkbox next to each file that belongs to the folder. At the top of the list, click Check In. A dialog box appears. You can leave the version comment blank or add a note. Click OK to check in the files. This action works even if you are not the user who checked out the file. - Return to the library and delete the folder
Go back to the document library. Navigate into the folder to confirm that all files now show a checked-in status (no lock icon). Then select the folder, click the ellipsis (three dots), and choose Delete. Confirm the deletion.
If You Cannot See the Manage Checked Out Files Option
The Manage checked out files link appears only if you have at least design or full control permissions on the library. If you do not see the link, ask a site owner or library administrator to perform the check-in steps.
If the Folder Still Cannot Be Deleted After Checking In Files
Checked Out Files Are Hidden in a Subfolder
The Manage checked out files page shows all checked out files in the library, regardless of folder depth. If you checked in files from the top level but the folder still cannot be deleted, open the Manage checked out files page again and look for files deeper in the folder hierarchy. A file checked out in a subfolder of your target folder also blocks deletion of the parent folder.
User Did Not Check In But Discarded the Checkout
If a user discards a checkout instead of checking in, the file reverts to the last saved version. The lock is removed, but the file remains. You can then delete the folder. To discard a checkout, ask the original user to open the file, click the ellipsis, and select Discard Check Out. Site owners can also discard checkouts from the Manage checked out files page by selecting the file and clicking Discard Check Out.
OneDrive Sync Client Holds a Lock
If a user has the library synced with OneDrive and has a file open, Windows may hold a file lock that SharePoint interprets as a checkout. Ask the user to close the file and pause OneDrive sync. Then try deleting the folder again.
Folder Deletion Blocked: Checked Out Files vs Other Locks
| Item | Checked Out File Lock | Other File Locks (Open File, Sync) |
|---|---|---|
| Cause | User manually checked out a file via SharePoint | File is open in an application or syncing via OneDrive |
| Error message | “Cannot delete folder because it contains checked out items” | “The file is in use” or “The action can’t be completed because the file is open” |
| Resolution method | Check in or discard checkout from Manage checked out files | Close the file, stop sync, or use Windows Task Manager to release the lock |
| Who can resolve | Original user or site owner | User who opened the file or a local administrator |
The table above shows the differences between checked out file locks and other types of file locks. The fix for a checked out file lock always requires action inside SharePoint, not on the local machine.
You can now locate checked out files using the Manage checked out files page and check them in to remove the deletion block. If the folder still cannot be deleted, check for hidden subfolder checkouts or discard checkouts instead of checking in. As a site owner, you can use the Manage checked out files page to check in any file in the library without needing the original user to act.