Per Nergård (MVP)
Jan 30, 2026
  760
(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

Please login to comment.
Latest blogs
Disabling the scheduler also stops event-based indexing in Optimizely

If you disable the scheduler in Optimizely CMS, should event-based indexing stop working too? It does!

Tomas Hensrud Gulla | Mar 13, 2026 |

Meet the latest OMVPs - H1 2026 Cohort

Meet the Latest Cohort of Optimizely Most Valuable Professionals (OMVPs) Every year, the Optimizely Most Valuable Professional (OMVP) program...

Satata Satez | Mar 13, 2026

Optimizely Commerce vs Composable Commerce: What Should You Do with CMS 13?

As organizations modernize their digital experience platforms, a common architectural question emerges: Should we continue using Optimizely Commerc...

Aniket | Mar 12, 2026

Missing Properties tool for Optimizely CMS

If you have been working with Optimizely CMS for a while you have probably accumulated some technical debt in your property definitions. When you...

Per Nergård (MVP) | Mar 10, 2026