Recently I have developed a tool to manage content types from a content type hub. Think about renaming content types or changing the parent. Something that doesn’t work out of the box. At least not completely. (I will blog about this later, hold on)
While developing and testing I encountered the error The content type is in use.
There are several occasions that will cause this error.
- Content exists in the Recycle Bin
Marc D Anderson has a blog post written about this recently. You’ll have to delete the content from the Recycle Bin somehow. - Documents not checked in yet
Try this: you have a Document Library with your content type as default and check-out/check-in is required. Then you upload multiple documents. After the upload the items are still checked out and you are the only one that can see them. As of this moment your content type cannot be deleted. Everything needs to be checked in and modify the content type for each item. - Previous minor version exists
Try this: you have a Document Library with Minor/Major versioning enabled. Upload a document and give it your content type. Publish your document to version 1.0. Then edit the properties and give it another content type. This will be 1.1. As of this moment your content type cannot be deleted. You’ll need to publish it first to the next major version.
So you have checked everything? No content using the content type, Recycle Bins are empty etc..? Sure? Well, I can tell you that you still might not be able to delete the content type. Trying so can show you this error message:
Some lovely SharePoint solution (WSP) with a feature deployed the content type. And to protect the solution and it’s functionality the content type cannot be deleted.
Now you have it. When deleting a content type fails you now know why.
It’w worth to note (speaking about point #1) that there are more than two recycle bins that may need to be emptied to resolve this error. The complete checklist from Erik Madsen’s answer in StackOverflow is:
* 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.”
The existence of the last two came as a surprise to me 🙂
Thank you buli, this is what I needed to know. In SharePoint Online it is called the “second stage recycle bin”. I feel like I just wrestled with SharePoint.
Changed to classic view and “second stage recycle bin” came up and it worked.
THANK YOU this was driving me stupid!