Unable to delete SharePoint 2010 ContentType "Contenty type in use."
In addition to the recycling bins there's also the page called "Manage files which have no checked in version" under "Permissions and Management" on document libraries - the files in there can also prevent deletion of a content type.
this powershell script form this post also worked for me
$siteURL = "The Site url"
$contentType = "Content type Name"
$web = Get-SPWeb $siteURL
$ct = $web.ContentTypes[$contentType]
if ($ct) {
$ctusage = [Microsoft.SharePoint.SPContentTypeUsage]::GetUsages($ct)
foreach ($ctuse in $ctusage) {
$list = $web.GetList($ctuse.Url)
$contentTypeCollection = $list.ContentTypes;
$contentTypeCollection.Delete($contentTypeCollection[$contentType].Id);
Write-host "Deleted $contentType content type from $ctuse.Url"
}
$ct.Delete()
Write-host "Deleted $contentType from site."
} else { Write-host "Nothing to delete." }
$web.Dispose()
I was frustrated by this issue until I found your comment. Excellent advice.
- Delete from site recycle bin.
- Delete from Site Collection > Site Settings > Site Collection Administration > Recycle Bin.
- Delete from End User Recycle Bin Items.
- Delete from "Deleted From End User Recycle Bin."
That's a lot of recycling! Once complete, I was able to delete the content type.