OneDrive File Issues

Fix: Cannot Delete a OneDrive Folder Because It Contains Items

Adam DavisAdam Davis Nov 2, 2026 868 views

Question details

The user is unable to delete a folder in OneDrive and receives an error stating that all items must be deleted first, even though the folder appears empty or only contains subfolders.

How to Fix 'Cannot Delete a OneDrive Folder Because It Contains Items'
Product
OneDrive
Device & OS
not provided
Scenario
Attempting to delete a specific folder within OneDrive.
Observed behavior
OneDrive blocks the deletion process, displaying a prompt that the folder contains items that must be removed, despite it appearing empty to the user.
Before you start

Ensure you have tested deleting the folder from both the local OneDrive sync folder and the OneDrive web interface before modifying site URLs.

Solution 1Recommended

Check for a Preservation Hold Library Policy

Use the OneDrive site contents page to check if an organization-level retention policy is preventing file deletion.

Often, Microsoft 365 administrators set up Data Loss Prevention (DLP) or retention policies. These policies automatically place deleted or modified files into a hidden 'Preservation Hold Library'. When such policies are active, standard users cannot permanently delete folders that contain protected items.

1
Test basic deletion

Try deleting the folder from OneDrive on the web. If it fails, try deleting it from your local OneDrive synchronization folder on your computer.

2
Access the site contents URL

If deletion fails in both locations, log into OneDrive on the web. In the browser's address bar, append '/_layouts/15/viewlsts.aspx?view=14' to the end of your OneDrive site URL and press Enter.

3
Locate the Preservation Hold Library

On the Site Contents page, look through the list of libraries and lists for an item named 'Preservation Hold Library'.

4
Contact your administrator

If the Preservation Hold Library exists, your files are protected by organizational policies. Contact your Microsoft 365 IT administrator and request them to adjust the retention policy or delete the folder for you.

Check for a Preservation Hold Library Policy
Administrator Rights Required: Only users with administrative privileges in the Microsoft 365 environment can bypass or disable Preservation Hold policies.
Free Microsoft Office alternative

Experience Hassle-Free File Management with WPS Office

If you are tired of encountering complex sync issues and restrictive backend policies in Microsoft Office, try WPS Office. It provides a lightweight, highly compatible alternative for creating, editing, and managing your documents effortlessly.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package.
  2. 2. Install the application: Run the installer and follow the on-screen instructions to set up WPS Office on your device.
  3. 3. Manage your files: Open WPS Office to easily manage, edit, and save your documents with built-in cloud support.
Seamless format compatibility with Microsoft Word, Excel, and PowerPointBuilt-in WPS Cloud for easy, policy-free file synchronization and storageLightweight design that ensures smooth performance even on older devicesFree to use with a familiar, easy-to-navigate user interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does OneDrive say my folder contains items when it looks empty?

The folder might contain hidden system files, temporary sync files, or items protected by a server-side retention policy (like a Preservation Hold Library) that do not appear in your standard view.

What is a Preservation Hold Library?

It is a hidden storage area in SharePoint and OneDrive managed by Microsoft 365 administrators. It retains copies of files to comply with legal or organizational data loss prevention (DLP) policies, preventing users from permanently deleting them.

Can I forcefully delete a folder protected by retention policies?

No, standard users cannot bypass organizational retention policies. You must contact your Microsoft 365 IT administrator to either exempt the folder from the policy or perform the deletion on your behalf.