regarding orphan sharepoint site

Will 616 Reputation points

Hi there,

Is there any way to delete a orphan site?? I try to many ways to delete orphan site by server code or PowerShell. It turns out the site is not orphan site and cannot be delete. I am realized that might be the information in database is corruption (data correlation is broken). so actually the site does not exists, but SharePoint always thinks that this website exists. Like this situation, does anyone have any idea on it??


SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,147 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,761 questions
{count} votes

Accepted answer
  1. MichaelHan-MSFT 17,996 Reputation points

    Hi @Will ,

    The information of orphan sites is stored in the configuration database > dbo.SiteMap table. You could delete the entry of orphan site from the dbo.SiteMap table.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

2 additional answers

Sort by: Most helpful
  1. Sharath Kumar Aluri 3,071 Reputation points

    way back I had the similar issue, below script worked for me. If the script didn't work try clearing the config cache from the below script and try again this script.

    Add-PSSnapin Microsoft.SharePoint.PowerShell
    $CorruptSites = ""
    Function DeleteCorruptSite
    Write-Host $CorruptSite : -foreground red
    $site = Get-SPSite $CorruptSite
    $siteId = $site.Id
    $siteDatabase = $site.ContentDatabase 
    $siteDatabase.ForceDeleteSite($siteId, $false, $false)
    Write-Host --Deleted from Content DB -foreground green
    foreach ($CorruptSite in $CorruptSites)
     DeleteCorruptSite $CorruptSite

    Below articles for more troubleshooting steps:,Automatically%22%20to%20delete%20orphaned%20items.

    Thanks & Regards,

    1 person found this answer helpful.
    0 comments No comments

  2. Frank van Eykelen 131 Reputation points

    Did you know that "orphan site" is an anagram of "sharepoint"? You're welcome.

    0 comments No comments