Per Nergård (MVP)
+2
Jan 30, 2026
visibility 1352
star star star star star
(0 votes)

Scheduled job for deleting content types and all related content

In my previous blog post which was about getting an overview of your sites content https://world.optimizely.com/blogs/Per-Nergard/Dates/2026/1/scheduledjob-for-getting-overview-of-site-content-usage/.

I actually found a couple of content types that was related to decomission functionality that actually hade quite a lot of created content. So what to do? ContentTypeObliteratorScheduledJob to the rescue.

It's very simple:

  1. Get the contenttype ids you want to remove all content for and deleting the actual content type as well.
  2. Take a database backup
  3. Add the contenttype ids into a comma separated list
  4. Run the job and enjoy less code and a less bloated content tree.

I have only done a test run on one content type but for that it worked. 

Link to my Gist: ContentTypeObliteratorScheduledJob.

Jan 30, 2026

Comments

error Please login to comment.
Latest blogs
Personalisation in CMS 13 when you go headless: variations in the CMS, decisions in Experimentation

Back in February I wrote about personalisation in CMS 13 using Audiences . Everything in that post still holds, with one condition I should have ma...

Minesh Shah (Netcel) | Sep 24, 2026

Optimizely Forms: 4.7.0 Too many concurrent connections

Optimizely Forms are eating your emails! How to make it stop!

Tomas Hensrud Gulla | Sep 24, 2026 |

Optimizely CMS 13.2: Cannot find an authentication provider for 'ActiveDirectoryManagedIdentity'

CMS 13.2 upgraded SqlClient to 7, and Managed Identity stopped working in Azure until I added one NuGet package.

Tomas Hensrud Gulla | Sep 23, 2026 |

Composition Over Inheritance: Why Your Content Contract Is Not a Base Class

Inside the structural conformance pattern in SaaS CMS — from server-side inheritance to pipeline governance. A contract in Optimizely SaaS CMS is...

Vipin Banka | Sep 19, 2026