Delete SharePoint site subsite permanently

Delete SharePoint site subsite on premise environment is a common task for administrator. You might be thinking how to permanently delete a SharePoint site collection in production server. There are difference scenarios, you might face while trying to delete a site SharePoint. After sharepoint site migration, we need to delete old site, exactly where its helpful, as per current situation.

Permanently delete a subsite in SharePoint from site settings

You can follow UI method for sharepoint subsite deletion following step by step procedure below.

  • Navigate to sharepoint subsite.
  • Open site settings.
  • Click on Delete this site present under Site Actions.
Delete SharePoint subsite from site settings
  • Click on Delete option present at bottom right.
  • Pop up will appear for confirmation.
  • Click on OK to delete.
delete this site in site settings

Permanently delete a site in SharePoint from site settings

Follow the same procedure to delete site collection as well. Navigate to site collection settings and click on delete this site. After that click on delete and OK to apply the change.

Same steps are also applicable to delete sharepoint online site in office 365.

Delete a Site Collection from Central Admin

You can follow another way to delete site collection from central admin without navigating to site settings.

  • Navigate to central admin
  • Click on Application Management.
  • Click on Delete a site collection present under option Site Collections.
delete a site collection in sharepoint from central admin
  • Select site collection from any one web application, from the drop down, that you want to delete and click on Delete.
  • Click on OK for confirmation to apply changes.
delete site collection

Delete SharePoint site collection powershell

Follow Remove-SPSite, the powershell command to delete site collection in SharePoint.

Remove-SPSite -Identity "<Site Collection Url>" -GradualDelete -Confirm:$False
Remove-SPSite -Identity "http://win-q2repghf9du:44179/sites/SharePointTech" -GradualDelete -Confirm:$False
Remove-SPSite

Delete SharePoint subsite powershell

If you need to delete SharePoint subsite using powershell command, follow Remove-SPWeb.

Remove-SPWeb -Identity "<Subsite Url>"
Remove-SPWeb -Identity "http://win-q2repghf9du:44179/sites/SharePointTechnicalSupport/Subsite1/"
Remove-SPWeb

Delete all site collections present under web application

If you want to delete all site collections present under one web application, follow the command below.

$WebApplicationURL="http://win-q2repghf9du:24072/"
Get-SPWebApplication $WebApplicationURL | Get-SPSite -Limit ALL | Remove-SPSite -Confirm:$false
Delete all site collections present under web application

Delete all site collections present under specific managed path

Specific requirement might come when user need to delete all site collections part of one specific sharepoint managed path, in a web application, using powershell.

Get-SPSite "<web application url>/<managed path>*" -Limit ALL | Remove-SPSite -Confirm:$false
Get-SPSite "http://win-q2repghf9du:27315/sites*" -Limit ALL | Remove-SPSite -Confirm:$false
Delete all site collections present under specific managed path

Similar Article



Categories: administration, Office 365 sharepoint online, powershell, powershell command, SharePoint 2019, SharePoint Online, sharepoint server, site collection

Tags: , , , , , , , , , , , , , ,