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.
- Click on Delete option present at bottom right.
- Pop up will appear for confirmation.
- Click on OK to delete.
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.
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.
- 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 SharePoint site collection powershell
Remove-SPSite -Identity "<Site Collection Url>" -GradualDelete -Confirm:$False Remove-SPSite -Identity "http://win-q2repghf9du:44179/sites/SharePointTech" -GradualDelete -Confirm:$False
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/"
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 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