Delete a site collection Sharepoint 2010

Posted on 2012-03-26
Last Modified: 2012-04-12
We needed to move a couple of site collections under a different department as we've had a restructure of management at my business.
I found this pretty cool tool that will essentially run the STSADM commands in the background through a GUI-type interface.
However, it essentially copies the site from one location to the other so I need to delete the site collection from the old location.
I tried to do that by clicking on "delete this site collection" from the "Site Actions" area under "Site Settings" but I get an error.  When I try to delete the site collection, I get the error stating I couldn't delete the site if there were sub-sites. There is a calendar associated with this site collection that I believe is causing the above error.  When I click on the calendar link to get to that sub-site, I get an error that it can't find a file and the site won't even open (I've attached a screen print of the error)
The file it's looking for is a 3rd party add-on that was installed on our Sharepoint 2007 setup.  When we upgraded to Sharepoint 2010, this product hasn't been installed but apparently a remnant still exists.
Can anyone give a STSADM or POWERSHELL command that will delete that file remnant so I can delete the site I need to delete?  Am I going to have to install that 3rd party product just to be able to delete this site collection? (I hope not)
Question by:skbarnard
  • 5
  • 4
  • 3
LVL 15

Expert Comment

ID: 37769908
Have you tried to delete this site collection from central administration? I will allow you to delete entire site collection with subsites.

Expert Comment

ID: 37770826
stsadm -o deletesite -url http://servername/sites/sitename

Author Comment

ID: 37772948
I have tried to delete the site from Central admin, I get the message the site isn't found.
The site was copied to its new location under a different department so when I try to find it under the old department, it says "No site was found that begins with /Departments/DepartmentName/SubDepartment" (SubDepartment is the actual site collection I'm trying to delete - not the actual name)

I tried using the STSADM command above from martusha and I get the message "there is no top level web site named http://servername:port/site/sitename" (I filled in the appropriate information)  I tried the command with & without the port, got the same error each time

I need to move one other site collection from the discontinued site then I may be able to do what dp_expert suggested as there would then be no viable sub-sites under this department.

I'll report back - unless either of you can address the error message I recieve.
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.


Author Comment

ID: 37773786
When I go to Central Admin, View all site collections - I'm unable to see all the site collections.
With our MOSS 2007 setup when I clicked on view all site collections, I could get a tree view and see top-level "portal", then see "departments" and under departments all sub-departments etc.  For instance Portal -> Departments -> BusinessOffice -> Insurance etc.
In the attached file, you can see what I see.  I've already chosen the top level site (Portal) and all I see then is the yellow area with the /.  So in the URL search area, I put the rest of the path (Departments/DeputySup/IS) and I get the error shown.
I even tried the whole URL and get the same error message.
Any thoughts?
I can't backup the site through Central Admin because I can't see all of the site collections.
My system doesn't seem to recognize the backup command in STSADM.
I tried using the following PS command - it appears to need or want more information because as soon as I press return, I get a >> prompt
Backup-SPSite -Identity "" -Path "C:\folder\filename" (this was entered on one line in PS, it was changed when typed into this message box)
LVL 15

Expert Comment

ID: 37775287
Let me get this straight - you can acces the site by going to it with URL but cannot see it in the central admin?

Are you using correct web application? When you choose site collections you are give also a field (partly visible on your screenshot in the top right corner) to choose the web app.

Author Comment

ID: 37779516
I usually take the long way to get to the site by going to the portal home page then click on the department, then the site.
However, I just tried navigating to the site directly by typing in the whole URL and YES - I can navigate to the site directly in the browser but when I try to see it in Central Admin, the site isn't found.
I have selected the correct web app (our portal web app) and under that I should be able to see a list of all the subsites under that web app, right?

Expert Comment

ID: 37780603
Under web application you should be able to see all available Site Collections (not subsites).
Maybe you want to delete a site, not a site collection?
LVL 15

Expert Comment

ID: 37780638
The view is being paged, so if you have a lot of site collections there might be some on other pages. But something struck me  - on the screenshot you have submitted you have only one site collection - the root one.

Are you sure you have multiple site collections? Because site collection is not just a set of sites but also an object in SharePoint.

If by site collection you mean a subsite and multiple subsites of this subsite, then this is not a site collection - just a collection of sites - and it's a very important distinction.

What do you see in the central admin when you go to "Application management" then "View all site collections" under the "Site collections" group? Only one entry with a "Slash" (first example on the attachment) or multiple entries (second example) ?
Many site collections and one site collection
If only one entry this means you have only one site collection. In this case go to the site you want to delete. There click "Site actions" and choose "Site settings" (you should get to On the site settings page click "Sites and Workspaces" (should show you the "" page) - there you will be able to delete the subsites of the current site. Once this list is empty you will be able to delete this current site.

Author Comment

ID: 37782906
When I go to the proper web application (, I see what you show in the top picture - one entry with a slash, but I should see what is pictured in your second picture.
I will eventually want to delete the site (martusha) but I continue to get the message
"Error deleting Web site "/Departments/DeputySup/Facilities". You can't delete a site that has subsites"
I get this error when I'm actually trying to delete the Facilities sub-site (site collection) that has already been copied to its new location.  That site collection has a calendar under "sites" that when I try to delete it, I get an error stating a file can't be found (from a 3rd party add-on that was part of our 2007 setup but never installed when we upgraded to 2010)  I get the error when I try to go to the facilities calendar page.  
In other words, I've tried everything that you mentioned, dp_expert but none of it has worked.
I've also tried "remove-spsite" PS command to no avail.

Accepted Solution

martusha earned 500 total points
ID: 37794831
It was a big mistake to not delete 3rd party add-ons (unused) before migration...
Try to delete that calendar with sharepoint manager, you can download it here:

Author Closing Comment

ID: 37835210
Cool tool - it enabled me to delete the site (and find that the site was under multiple departments!)

Expert Comment

ID: 37836498
Yes, its really nice. Happy to hear that it helped you.

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
InfoPath 2013 4 74
How to configure smtp service for Sharepoint server? 4 61
SharePoint List Calculated Field 4 33
SharePoint 2013 with K2 5 23
Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question