3

When trying to delete a content type I am getting an error message stating it's still in use. Unfortunately Microsoft is extremely limited on documentation for this type of issue and the error message logging is limited and not useful. I am certain there is no place where it's in use. I have tried several methods posted here which includes running powershell scripts to find out where the content type is being used but those methods were ineffective. I spent an entire day trying to find out where it is to no avail and I'm at my wits end.

Below is a link to one of the solutions that suggests the powershell script approach. It didn't work for me.

How to find all documents of a certain content type?

If anyone can suggest another approach, I would appreciate it.

3

In addition to making sure there are no list items or documents consuming the content type, you must also ensure there are no items in the recycle bins as well, or SharePoint will not allow those content types to be deleted.

1

One or more of the things "using" it haven't been completely deleted.

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."

If you can't get to the End User Recycle Bin etc, you need more permissions, you to get a farm admin to do it for you.

1

Something that worked for me was to also remove previous versions of documents that may be using the content type you want to delete.

Use Version History for each suspect item in the library and choose Delete All Versions or Delete All Minor Versions. These go to the recycle bin so you will have to delete them from there too.

I only had a small number of items so did it manually. I found this article that gives a Powershell script to do it for you, but instead of deleting all versions, you could potentially just delete versions that use the content type you want to delete. Something like this would help find them anyway:

foreach ($item in $ItemsColl) 
{
    foreach($Ver in $item.Versions)
    {
        if ($Ver.ListItem.ContentType.Name -eq "Some CT") 
        {
            Write-Host "URL: " $item.Url "Version: " $Ver.VersionLabel            
        }
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.