Tuesday, July 2, 2013

Force Delete Corrupted SharePoint List using PowerShell

I got few corrupted lists when a custom code, which provisions lists got stuck in middle! I couldn't delete the corrupted list neither from SharePoint web interface nor using SharePoint Designer!

When I tried to access the corrupted SharePoint list from browser, received this error message:
"List does not exist. The page you selected contains a list that does not exist. It may have been deleted by another user."

Alright, How to force delete corrupted SharePoint list? To delete corrupted list in SharePoint, we can either use STSADM command line tool or PowerShell.

Delete corrupted list in SharePoint 2007 using STSADM:
We can delete the corrupted list using stsadm forcedeletelist command. Here is how:
Stsadm -o forcedeletelist -url <LIST URL>

SharePoint delete list with PowerShell
We can delete the corrupted list using PowerShell programmatically. Here is the script for SharePoint 2010 to delete corrupted list:

#Get the Web 
$web = Get-SPWeb "<SharePoint-site-URL>"
#Get the corrupted List
$list = $web.lists["corrupted list name"]
#Set the AllowDeletion Flag to True
$list.AllowDeletion = $true

#Permanently Delete the list

#To Send it to Recycle bin, use:  $list.Recycle()

or use this alternate approach: Force delete list SharePoint 2010 PowerShell
Get-SPWeb "http://sharepoint-site-url" | where-object { $_.Lists["corrupted list name"].Delete() }
This removes corrupted list in SharePoint 2010.

BTW, there are other causes for the error: "List does not exist.", I got this error message after a SharePoint migration.
  1. DNS/AAM entries are not properly configured.
  2. User doesn't has access to content type/Document Template which is being used by the list.
  3. Site may be locked! Go to: Central Administration, Site collection quotas and locks to unlock the site.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:


  1. Thank you!! Fixed my problem.

  2. How can I do this at 2013?

    1. The given PowerShell script works with SharePoint 2013 as well.


Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...