How to properly delete Content Types from a SharePoint Site
If you are into metadata, I am sure you heard about Content Types as well. I blogged previously about this amazing feature. They offer an excellent way to organize and structure content in SharePoint. However, Content Types (by design) have one big limitation. It is hard to get rid of them! So with his post, I would like to explain how to properly delete Content Types from a SharePoint Site without going insane.
The problem
Let’s say you created a Content Type at the site level, added one to the document library, perhaps even tagged some documents with it. And then, for whatever reason, you need to delete that content type from a library and site and start fresh. So you follow the steps below.
- Click Gear Icon > Site Information
- Click View all site settings
- Click on Site content types
- Click on a Content Type you would like to delete
- Click on Delete this site content type
- You will most likely get this error message below: “Sorry, something went wrong. Another site or list is still using this content type. If you would still like to delete it, please remove the content type from all sites and lists and then try again.”
- Next, you navigate to the Library where the content type is/was used and try to remove it from there as well. Yet, you also get a similar error message “Sorry, something went wrong. Content Type is still in use.”
How to properly delete Content Types from a SharePoint Site
At this point, it becomes somewhat an adventure, because you will need to go through the steps below to actually achieve the deletion of the content type. Below are 4 steps you must follow to get rid of the content types once and for all! It is imperative to note that it is not just one of the steps you would need to perform. To delete the content types, you would need to take care of all the 4 steps outlined below!
1. Make sure the Content Type did not originate from the Content Type Gallery
If the content type was created and published from the Content Type Gallery – those content Types cannot be removed and have to be unpublished first. If that is the case, you will not be able to delete those content types from your site at all! The delete option will be completely missing.
2. Change association for existing documents
The reason why content types can’t be deleted is that you still have documents tagged against the content type you would like to delete. So, first, you would need to change the association of all the documents tagged with that content type to another content type. For example, I want to get rid of the Content Type called Invoice on my site, so I need to re-assign all the documents to another Content Type first.
Once that is done, and you try to delete the content type from the site, you will still get the error message.
3. Remove the Content Type from the libraries or lists that are using it
Before you can delete the Content Types from the site, they need to be disassociated from the list/library they were added to. Make sure to scan all libraries on your site to remove them there first.
4. Remove the Content Type Inheritance
Make sure to check the other Content Types that exist on a site. If you are using the Content Type you are trying to delete as a Parent Content Type or a Content Type within a Document Set, you won’t be able to delete those Content Types until you remove the association/inheritance.
Example of the Document Set Inheritance
Example of the Parent Content Type Inheritance
Other Notes
Some old blog posts on a similar topic reference the Recycle Bins as well. In the past, one extra step we had to do was to empty the deleted documents from both the User Recycle Bin and the Second-Stage Recycle Bin. This was necessary “to completely purge the deleted Content Types in case the user decided to restore them at some point.” I just wanted to let you know that this is no longer necessary with modern SharePoint (SharePoint Online). If you delete the content types from your list/library/site and then the user decides to restore the document from the Recycle Bin within the 93-day period, the document will be restored and assigned the name of the Document Library in place of the Content Type field.