A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Per Nergård (MVP)
Jan 30, 2026
  30
(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
Working With Applications in Optimizely CMS 13

💡 Note:  The following content has been written based on Optimizely CMS 13 Preview 2 and may not accurately reflect the final release version. As...

Mark Stott | Jan 30, 2026

Experimentation at Speed Using Optimizely Opal and Web Experimentation

If you are working in experimentation, you will know that speed matters. The quicker you can go from idea to implementation, the faster you can...

Minesh Shah (Netcel) | Jan 30, 2026

How to run Optimizely CMS on VS Code Dev Containers

VS Code Dev Containers is an extension that allows you to use a Docker container as a full-featured development environment. Instead of installing...

Daniel Halse | Jan 30, 2026