Search Results Show Deleted Documents: Root Cause and Fix
🔍 WiseChecker

Search Results Show Deleted Documents: Root Cause and Fix

When you search for a file in SharePoint or Microsoft 365, the results sometimes include documents you have already deleted. This can confuse users and lead to wasted time trying to open broken links. The problem occurs because the search index does not immediately remove entries for deleted items. This article explains why the search index retains deleted documents and provides three methods to remove them from search results quickly.

Key Takeaways: Fixing Deleted Documents in SharePoint Search

  • SharePoint admin center > Search > Crawl log: View which items the search crawler has indexed and identify stale entries.
  • PowerShell cmdlet Request-SPOPersonalSite: Forces a full re-index of a site collection to remove deleted items from search.
  • Site settings > Search and offline availability > Reindex site: Triggers a site-level reindex that clears out orphaned search entries.

ADVERTISEMENT

Why SharePoint Search Still Shows Deleted Documents

SharePoint search relies on an index that is built by a crawler. The crawler scans sites on a schedule, typically every few minutes for content updates. When you delete a document, the crawler does not immediately remove it from the index. Instead, the index entry remains until the next crawl cycle confirms the deletion. This delay can be several minutes to hours depending on the crawl schedule and the load on your SharePoint environment.

A second cause is that the search index does not track the recycle bin. When a document is moved to the recycle bin, it is still considered a valid item by the search system. Only after the item is permanently deleted from the recycle bin does the index eventually update. Users who see deleted documents in search results are often viewing items that are still in the recycle bin or that have not been re-crawled yet.

A third factor is the search schema and managed properties. If a document was indexed with custom managed properties, those properties may persist even after the document is removed. The search system might return the document based on stale metadata. This is more common in environments with extensive custom search configurations.

Methods to Remove Deleted Documents from Search Results

You have three options to force the search index to drop deleted documents. Choose the method that matches your permission level and the scope of the problem.

Method 1: Reindex the Site from SharePoint Admin Center

  1. Open SharePoint admin center
    Go to https://admin.microsoft.com and select SharePoint. In the left navigation, choose Sites and then Active sites.
  2. Select the affected site
    Click the site name where deleted documents appear in search results. This opens the site details panel.
  3. Trigger a reindex
    In the site details panel, find the Policies tab. Under Search and offline availability, click Reindex site. A confirmation dialog appears. Click Reindex to start the process.
  4. Wait for completion
    The reindex request adds the site to the crawl queue. Depending on your crawl schedule, it can take 15 minutes to a few hours. After the crawl finishes, deleted documents will no longer appear in search results.

Method 2: Use PowerShell to Force a Full Crawl

  1. Install SharePoint Online Management Shell
    Open Windows PowerShell as an administrator. Run the command: Install-Module -Name Microsoft.Online.SharePoint.PowerShell. If you already have the module, run Update-Module -Name Microsoft.Online.SharePoint.PowerShell.
  2. Connect to SharePoint Online
    Run Connect-SPOService -Url https://yourtenant-admin.sharepoint.com. Replace yourtenant with your actual tenant name. Sign in with a SharePoint admin account.
  3. Request a site reindex
    Run Request-SPOPersonalSite -UserMailBoxes user@yourtenant.com if the site is a personal site (OneDrive for Business). For a team or communication site, use Set-SPOSite -Identity https://yourtenant.sharepoint.com/sites/yoursite -EnableAutoNewsDigest $false to trigger a property change that forces a reindex.
  4. Verify the crawl status
    Check the crawl log in SharePoint admin center under Search > Crawl log to confirm the site was reindexed. Deleted documents should no longer appear in search results.

Method 3: Permanently Delete Items from Recycle Bins

  1. Open the site recycle bin
    Navigate to the affected site. In the Quick Launch menu, click Recycle bin. If you do not see it, click Site contents then select Recycle bin from the top menu.
  2. Select all items
    Check the box next to each deleted document. To select all, check the box at the top of the list.
  3. Delete items permanently
    Click Delete at the top of the recycle bin. A confirmation dialog appears. Click Delete again. This moves the items to the second-stage recycle bin.
  4. Clear the second-stage recycle bin
    At the bottom of the recycle bin page, click Second-stage recycle bin. Select all items and click Delete. This permanently removes the documents from the site and signals the search crawler to remove them.

ADVERTISEMENT

If Search Still Shows Deleted Documents After the Main Fix

Sometimes the standard reindex methods do not work immediately. Below are two related failure patterns and their fixes.

Deleted Documents Still Appear After Reindexing

If you reindexed the site but deleted documents still show, the crawl may not have completed. Check the crawl log in SharePoint admin center under Search > Crawl log. Look for errors or warnings for the affected site. If the crawl log shows the site was crawled successfully but the documents remain, run a full crawl using PowerShell with the Set-SPOSite -Identity -StorageQuotaWarningLevel command. Changing the storage quota warning level forces a full reindex of the entire site collection.

Search Results Include Files from a Deleted Library

When you delete an entire document library, the search index may still hold references to the files that were in it. The fix is to delete the library from the recycle bin and then reindex the parent site. Navigate to Site contents, locate the deleted library in the recycle bin, and permanently delete it. Then trigger a site reindex from SharePoint admin center as described in Method 1.

Manual Reindex vs Automatic Crawl: Key Differences

Item Manual Reindex Automatic Crawl
Trigger Admin action in admin center or PowerShell Scheduled by SharePoint based on content changes
Speed Starts within minutes; crawls the entire site Can take hours depending on crawl schedule
Scope Full site collection Only items that changed since last crawl
Effect on deleted items Removes them from index immediately after crawl Removes them only after crawl detects deletion
Permission required SharePoint admin or site collection admin No action needed; runs automatically

You now have three methods to remove deleted documents from SharePoint search results. Start by permanently deleting items from the recycle bin and then reindexing the site from SharePoint admin center. If the problem persists, use PowerShell to force a full site reindex. For ongoing maintenance, monitor the crawl log in SharePoint admin center to ensure the search index stays current with your content changes.

ADVERTISEMENT