25 February, 2013

You can’t delete a site that has subsites


Cannot Delete Subsite

Error deleting a website “/Teamsite/SP2010”. You can’t delete a site that has subsites

If you are facing this error message then there are multiple ways to delete it. Let’s look at those details and let me know in case of any queries/doubts based on the same.

-Subsite console
-Site collection console
-SPD 2010
-STSADM utility
-PowerShell utility
-Content and structure

Imp Note:
-You need to make sure that which subsite you are trying to delete and
-How many nested subsites are present underneath?
-Logged in account that you are using to delete that subsite
-Make sure you don't have any meeting workspaces on your site

Let’s look into each category by exploring thoroughly:

Subsite Console:
-Login to SharePoint site with administrator account.
-Click "Team Site" on the top of the "Admin" Page.
-Navigate to the subsite you prefer to delete.
-Click "Site Actions", and then click "Site Settings".
-Click “Delete this site” under "Site Actions".
-Click "Delete" Button, and then click "OK" to confirm.

Site Collection Console:
-Login to the SharePoint site collection with admin account
-Site actions
-Site settings
-Site administration
-Sites and workspaces
-You will see a list of subsites which are present underneath the site collection
-In the right hand side, you will find the option of delete
-Click on delete and it will ask you to confirm the details
-Click OK
-That’s it and you are done.

SharePoint Designer 2010 Console:
-Click start
-All programs
-Microsoft Office SharePoint Designer 2010
-File
-Open site
-Enter the site collection URL
-Once the site will be open then you will see the complete hierarchy
-You will see a separate section named as “Subsites”
-Click on it and you will see the number of subsites in the right hand side
-Right click on the subsite that you want to delete
-Click OK and you are done.

Content and structure:
-Site Actions -> Site Settings
-Site Administration: Content and Structure
-In the left column, move to the parent of the main site to be deleted
-In the right column, choose the site to be deleted (Your Site in our example)
-Menu: Actions -> Delete

-Note: Deleting the selected sites will permanently delete all content and user information. All subsites in this site will also be permanently lost. Do you want to continue? Click OK.

STSADM Utility:
stsadm -o deleteweb

   -url <URL name>

For deleting a site within an orphaned site collection or an orphaned site within a site collection:

   -force

   -webid <Web ID>

   -databasename <database name>

   -databaseserver <database server name>

POWERSHELL Utility:
Remove-SPWeb "http://ursite/" -Confirm:$false

Reference:
 
If you have any queries/questions regarding the above mentioned information then please let me know. 

I would be more than happy to help you as well as resolves your issues…

Thank you.

7 comments:

  1. Thanks for writing such a valuable information and more importantly i would like to appreciate on the descriptiveness.

    ReplyDelete
  2. Thanks a lot. I found I was unable to delete a 2013 subsite via the main UI, but as soon as I went to it in Designer and deleted it everything worked fine.

    ReplyDelete
    Replies
    1. You are always welcome :) I am glad it worked for you and most importantly - Thanks for the confirmation by putting the comment!

      Delete
  3. Iam working on my test server ..i try to delete a site which i created before...but it is giving error that you can't delete a site that has subsites...i tried deleting it cia. Designer also...it showing..can not delete this folder...can you pls tell...what can be the reason and hw can i delete it

    ReplyDelete
    Replies
    1. Did you try PowerShell command, use -force para - this will work without any issues!

      Delete
  4. Hi. I getting an error that I can not delete a site because there are sub-sites. I have deleted all sub-sites, when I go to SPD there are no sub-sites listed, it only gives me the option to create a new one. Please help?

    ReplyDelete

Your feedback is always appreciated. I will try to reply to your queries as soon as possible- Amol Ghuge

Note: Only a member of this blog may post a comment.