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 a 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
$list.Update()

#Permanently Delete the list
$list.Delete()

#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. The user doesn’t have 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.

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

4 thoughts on “Force Delete Corrupted SharePoint List using PowerShell

  • June 16, 2017 at 11:04 PM

    This works like a charm using Sharepoint 2013 Management shell
    Stsadm -o forcedeletelist -url https://SITENAME/Lists/LISTNAME

    Reply
  • December 21, 2014 at 1:36 PM

    How can I do this at 2013?

    Reply
  • December 3, 2013 at 9:18 PM

    Thank you!! Fixed my problem.

    Reply

Leave a Reply