Per Nergård (MVP)
Jan 30, 2026
  334
(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
Optimizely CMS 13 (Pre-release) Visual Builder

This post captures a proof of concept built on an Alloy MVC site upgraded to Optimizely CMS 13 pre-release, focused on Visual Builder, how to model...

Francisco Quintanilla | Feb 11, 2026 |

Personalized User Journeys with Optimizely CMS

Daniel Copping | Feb 10, 2026 |

Optimizely CMS 12 behaving strangely after upgrading from CMS 11

After upgrading from Optimizely CMS 11 to CMS 12, content type changes stopped working due to an assembly version mismatch. This post explains the...

Henning Sjørbotten | Feb 10, 2026 |

Episode 2 of the OMVP Strategy Roundtable is out

AI is everywhere right now. Strategy decks are full of it. Roadmaps promise it. Tools are shipping faster than teams can keep up. But when it comes...

Satata Satez | Feb 10, 2026