Per Nergård (MVP)
Jan 30, 2026
  844
(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
Forcing Lowercase URLs in Optimizely CMS During Auto-Translation

Learn how to fix uppercase and punctuation issues in Optimizely CMS 12 URL segments caused by LanguageManager auto-translation using a custom...

Stuart | Apr 2, 2026 |

Stott Robots Handler v7 for Optimizely CMS 13

Stott Robots Handler version 7 is now available for  Optimizely PaaS CMS 13 . This is includes updates to support the switch from a Site based...

Mark Stott | Apr 2, 2026

Automating Block Translations in Optimizely

Stop manual block-by-block translations. Learn how to use the TranslateOrCopyContentAreaChildrenBlockForTypes config to automate Optimizely CMS...

Stuart | Apr 1, 2026 |

How to Disable automatic indexing in Optimizely Search & Navigation

Learn how automatic event-based indexing works in Optimizely Search & Navigation and how you can temporarily disable it.

Tomas Hensrud Gulla | Apr 1, 2026 |