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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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.
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now


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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

728 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