In this SharePoint tutorial, we will discuss how to delete a SharePoint site in Office 365 SharePoint Online. Also, we will see how to delete a site collection in SharePoint 2013, SharePoint 2016, or in SharePoint 2019.
I will also show you how to delete SharePoint subsite. Apart from this, we will see how to delete a SharePoint site using PowerShell.
Also, we will see how to delete SharePoint site permanently and using PowerShell.
What will get deleted when you Delete a SharePoint Site?
Now, we will see what will get deleted when you delete a SharePoint Online site or previously known as a site collection.
When you delete a SharePoint site, then everything will be get deleted like:
- All the list and libraries with content (like list items or files)
- Site settings and history
- All subsites and the subsite contents
Note: You need to be a global or SharePoint admin in Office 365/Microsoft 365 to delete a SharePoint site.
Once you delete a SharePoint Online site, the site will be available for 93 days under the Deleted sites. Within 93 days, you can restore the SharePoint site.
Delete SharePoint Site (Office 365)
Now, let us see how to delete a SharePoint site from the SharePoint Online admin center.
Login to the SharePoint Online admin center. Then click on Active sites, which will show all the SharePoint Online sites.
Select the SharePoint site that you want to delete, and click on the Delete button from the command bar like below:

If the SharePoint site is connected to Office 365 group, then you will see a warning box, select the checkbox Delete the group and all its resources. Then click on the Delete button like below:

Now, the SharePoint site will get deleted and moved to the Deleted sites in SharePoint Online admin center.
Delete a SharePoint Team site or communication site
Now, I will show you how to delete a SharePoint team site or SharePoint communication site from the site itself.
Open the SharePoint Online team site or communication site, click on the Gear icon or settings icon, and then click on Site information.

This will open the Site Information dialog box, where you can see a few information on the SharePoint site. Here click on the Delete site link like below:

Then it will ask you to select the checkbox to Delete Office 365 group. Make sure to check the “Yes, delete this group and all its associated resources.“

Click on the Delete button and the SharePoint Online team site will get deleted and moved to SharePoint site deleted sites list in the SharePoint Online admin center.
Delete SharePoint Online Classic Site
If you want to delete SharePoint classic team site, then we can delete it from the SharePoint site settings page.
Open the SharePoint site, click on the gear or settings icon, then click on Site settings.
Then in the SharePoint site settings page, under Site Actions click on Delete this site like below:

Then it will display the Delete This Site page that will display a warning message like below:

Here, click on the Delete button and the SharePoint site will be deleted.
Delete SharePoint site (Classic Admin Center)
Now, let us see how to delete a SharePoint site from the classic SharePoint admin center.
Open the classic SharePoint admin center (from the below URL)
https://<YourTenantName>-admin.sharepoint.com/_layouts/15/online/SiteCollections.aspx
Let us see how to delete a SharePoint site collection in Office 365 SharePoint online.
From the classic site collection page, select the site (which we want to delete) from the SharePoint site collection list. In the Top of Site collection page, we can see the Delete option from the options bar. Click on Delete.

Now it is asking for confirmation did you confirm want to delete the site from site collection list.
Note: When we delete the site it will store to recycle bin of SharePoint Online. It will stay 93 days in the recycle bin, within that time period we can restore the site collection in Office 365 SharePoint Online.
If the time period cross then it permanently deleted, you can not restore.

How to delete SharePoint subsite
Now, we will see how to delete a SharePoint subsite from the Site in SharePoint Online Office 365. We can follow the same process in SharePoint on-premise.
Open the particular SharePoint subsite which we want to delete.
Go to Site Settings -> Site Actions -> Delete this site.

In the Delete Settings page, it will ask for confirmation. Click on Delete.

Now one more dialogue box will come it is asking did you want to send this site to recycle bin or not. Click on OK.

Now we can see the message that our site successfully deleted.

Delete SharePoint 2013 site collection
Now, let us see how to delete SharePoint on-premise site collection, like how to delete SharePoint 2013 site collection or steps to delete a site collection in SharePoint 2016 or SharePoint 2019 from the SharePoint central administration.
Let us see how to delete a site collection from SharePoint central administration.
Open SharePoint 2013/2016/2019 central administration, click on Application management. And then click on Delete a site collection, which is presented under Site Collections like below:

Then in the Delete Site Collection page, choose a particular site collection and then click on the Delete button like below:

Then it will display a confirmation message and once you click on the Delete button, the SharePoint site collection will get deleted.
Delete SharePoint Site using PowerShell
Now, we will see how to delete SharePoint site using PowerShell.
We can use Remove-SPSite PowerShell cmdlets to delete a SharePoint 2013 site using PowerShell.
Remove-SPSite -Identity "https://SharePointSiteCollectionURL"
Once you execute the command, it will delete the site collection and all its subsites.
Similarly, if you want to delete all SharePoint site collections under a SharePoint web application, you can run the below PowerShell cmdlets.
Get-SPWebApplication https://<YourWebApplicationURL> | Get-SPSite -Limit ALL | Remove-SPSite -Confirm:$false
Delete SharePoint Online Site using PowerShell
First, you have to install the SharePoint Online management shell and You should be a global or SharePoint administrator to run the below PowerShell command.
We can use the Remove-SPOSite PowerShell cmdlets if you want to remove a SharePoint Online site using PowerShell that is not connected to an Office 365 group.
Connect-SPOService -Url https://tsinfo-admin.sharepoint.com -credential bijay@tsinfo.onmicrosoft.com
Remove-SPOSite -Identity https://tsinfo.sharepoint.com/sites/Business -NoWait
If the SharePoint Online site is an Office 365 group connected site, then we need to use the Remove-SPOSiteGroup PowerShell cmdlet like below:
Connect-SPOService -Url https://tsinfo-admin.sharepoint.com -credential bijay@tsinfo.onmicrosoft.com
Remove-SPOSiteGroup -Identity https://tsinfo.sharepoint.com/sites/Business -Identity Business
This is how we can delete a SharePoint Online site using PowerShell or SharePoint Online management shell.
Delete SharePoint site permanently
Now, we will see how to delete SharePoint site permanently.
Open the SharePoint admin center, go to the Deleted sites.
There you can see all the deleted SharePoint sites.
Select a SharePoint site, that you want to delete permanently and then click on the Permanently delete button.

This is how we can delete a SharePoint site permanently.
Delete SharePoint site permanently using PowerShell
We can use Remove-SPODeletedSite cmdlets, If you want to delete SharePoint site permanently using PowerShell.
But make sure, you have installed the SharePoint Online management shell and You should be a global or SharePoint administrator to run the below PowerShell command.
Connect-SPOService -Url https://tsinfo-admin.sharepoint.com -credential bijay@tsinfo.onmicrosoft.com
Remove-SPODeletedSite -Identity https://tsinfo.sharepoint.com/sites/SPGuides
Once you run the above PowerShell cmdlets, then the SharePoint site will be deleted permanently.
Delete SharePoint Online site PowerShell
In this tutorial, we will discuss how to delete SharePoint Online site using PowerShell. Also, we will see how to restore a SharePoint Online site from the recycle bin using PowerShell. And we will see how to permanently delete SharePoint site using PowerShell.
PowerShell is very useful in SharePoint Online as well as for SharePoint on-premise version.
If you are new to SharePoint Online PowerShell, then read Connect to SharePoint Online Site using PowerShell.
Delete SharePoint Online site collection using PowerShell
We can use Remove-SPOSite PowerShell cmdlets to move the SharePoint Online site or site collection to the recycle bin.
This command will not delete the site collection permanently instead it will just move to the recycle bin in SharePoint Online.
Just to let you know that you must be a SharePoint Online global administrator and a site collection administrator to run the below cmdlet.
Even if you are a SharePoint Online global administrator, it will not allow you to delete the site collection if you are not a site collection administrator.
Below is the PowerShell command to remove SharePoint site collection.
Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
Connect-SPOService -Url https://onlysharepoint2013-admin.sharepoint.com -credential bijay@onlysharepoint2013.onmicrosoft.com
Remove-SPOSite -Identity https://onlysharepoint2013.sharepoint.com/sites/MySite -Confirm:$false

Once you run the command, the site will be moved to the recycle bin. See the fig below:

Permanently delete SharePoint Online site PowerShell
If you want to permanently delete the SharePoint Online site from the recycle bin, you can run the below command:
Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
Connect-SPOService -Url https://onlysharepoint2013-admin.sharepoint.com -credential bijay@onlysharepoint2013.onmicrosoft.com
Remove-SPODeletedSite -Identity https://onlysharepoint2013.sharepoint.com/sites/MySite -Confirm:$false
Restore SharePoint Online Site from Recycle Bin using PowerShell
Similarly, if you want to restore the deleted SharePoint Online site from the recycle bin, you can run the below PowerShell cmdlets.
Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
Connect-SPOService -Url https://onlysharepoint2013-admin.sharepoint.com -credential bijay@onlysharepoint2013.onmicrosoft.com
Restore-SPODeletedSite -Identity https://onlysharepoint2013.sharepoint.com/sites/MySite

Here, we learned how to delete SharePoint Online site collection using PowerShell and also how to permanently delete a site using PowerShell from the recycle bin.
PnP CSOM Delete site collection in SharePoint Online
Here, let us see how to delete site multiple site collections using PnP CSOM in SharePoint Online.
I have an Excel spreadsheet which contains one column as:
- SiteURL: This defines to provide an address URL of SharePoint Subsite which you want to delete.
You can see the column and its values in below Excel spreadsheet screenshot:

By using this above Excel sheet, We need to delete SharePoint Subsite using pnp csom programmatically.
For this requirement, At first, we have to retrieve the Excel Sheet and then we have to write the code for deleting SharePoint Subsite. For that you can follow the below-tested csom code:
public void DeleteSubsite()
{
try
{
Excel.Application xlApp;
Excel.Workbook xlWorkBook;
Excel.Worksheet xlWorkSheet;
Excel.Range range;
string strSubsiteURL;
int RowCount;
int TotalRow = 0;
xlApp = new Excel.Application();
xlWorkBook = xlApp.Workbooks.Open(@"D:\SharePointSubsiteData", 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
range = xlWorkSheet.UsedRange;
TotalRow = range.Rows.Count;
for (RowCount = 2; RowCount <= TotalRow; RowCount++)
{
strSubsiteURL = (string)(range.Cells[RowCount, 2] as Excel.Range).Value2;
string siteUrl = "https://yourtenantname.sharepoint.com/sites/TSInfoteam";
string userName = "preeti@yourtenantname.onmicrosoft.com";
string passWord = "**********";
OfficeDevPnP.Core.AuthenticationManager authManager = new OfficeDevPnP.Core.AuthenticationManager();
ClientContext context = authManager.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userName, passWord);
bool success = context.Web.DeleteWeb(strSubsiteURL);
if (success)
{
lblMessageDeleteSubsite.Text = "Subsite deleted successfully";
}
else
{
lblMessageDeleteSubsite.Text = "Problem in deleting the Subsite";
}
}
}
catch (Exception ex)
{
lblMessageDeleteSubsite.Text = ex.StackTrace;
}
}
Hence I have written this code in a button click, So the code will run when you will click on the button. Once you will execute this above csom code, You can see the output in the Site Content of your existing URL.
In the below screenshot, You can see there is no Subsite present in the Site contents of existing Site URL(Which you are provided in the above csom code).

This is how to delete multiple site collections using PnP CSOM in SharePoint Online.
You may like following SharePoint site tutorials:
- Enable blank site template SharePoint 2013/2016/2019
- Create SharePoint Subsite + Programmatically and PowerShell
- How to change SharePoint Online Modern Site Theme
- How to create a communication site in SharePoint using PowerShell
- How to remove SharePoint Online Site Collection Administrator using PowerShell
- How to change SharePoint Online site URL
- PnP PowerShell commands for SharePoint Online Site
- Customize Modern SharePoint Online Site
- Save list as template missing in SharePoint Online modern team site
- Disable content on a SharePoint site to be searchable
In this tutorial, we learned how to delete a SharePoint site and the below things:
- What will get deleted when you Delete a SharePoint Site?
- Delete SharePoint Site (Office 365)
- Delete a SharePoint Team site or communication site
- Delete SharePoint Online Classic Site
- Delete SharePoint site (Classic Admin Center)
- How to delete SharePoint subsite
- Delete SharePoint 2013 site collection (delete a site collection in SharePoint 2016/2019)
- How to permanently delete SharePoint site
- Delete SharePoint site permanently using PowerShell
- How to delete multiple site collections using PnP CSOM in SharePoint Online
Hello Everyone!! I am Bhawana a SharePoint MVP and having about 10+ years of SharePoint experience as well as in .Net technologies. I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools. Now exploring more in SharePoint 2016 🙂 Hope here I can contribute and share my knowledge to the fullest. As I believe “There is no wealth like knowledge and no poverty like ignorance”
Hi Bhawana,
Thanks for such a great article. I have one question, In a SharePoint On-Premise, how one can delete SharePoint personal site of a user using Rest API?