I have deleted one of my site collection and when I check under View All Site Collection
in Central Administration the deleted site collection is still appearing.
How can I remove that site from there also?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI have deleted one of my site collection and when I check under View All Site Collection
in Central Administration the deleted site collection is still appearing.
How can I remove that site from there also?
When a site collection is deleted from GUI, the deleted site collection is stored in the SPDeletedSite
object to be able to restore it back within 30 days
using Restore-SPDeletedSite cmdlet.
So to remove the site collection permanently from SPDeletedSite object, you should use Remove-SPDeletedSite
cmdlet as the following
Remove-SPDeletedSite -Identity a valid server-relative URL or a valid GUID
Note: to get valid GUID use Get-SPDeletedSite
For more details check Remove-SPDeletedSite
In case your issue still persists or you can't find your Site GUID in Get-SPDeletedSite list that means the site was not deleted properly so it is still shown in View All Site Collection and in this case, you need to use ForceDeleteSite as the following:
$site = Get-SPSite http://siteurl
$siteId = $site.Id
$gradualDelete = $false
$restorable = $true
$siteDatabase = $site.ContentDatabase
$siteDatabase.ForceDeleteSite($siteId, $gradualDelete , $restorable)
By the way, To remove the site collection immediately, you should use PowerShell instead of GUI via Remove-SPSite
–GradualDelete:$False
cmdlet.
Remove-SPSite –Identity "http://sitename" –GradualDelete:$False
This operation is recommended for deleting very large sites but it's not recommended in case you intend to restore it back because it doesn't retain the SPSite object in the Gradual Site Deletion Queue.
Note: it's recommended to backup a site collection before you delete it using
GradualDelete:$False
because you will not be able to restore it
Read more about Gradual Site Delete in SharePoint 2010