Per Nergård (MVP)
+1
Jan 30, 2026
visibility 1233
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
Finding Thomas Part 5 - The Closed Loop

Five weeks. Five layers. One Thomas. If you've followed this series from the start — thank you. If you're just landing here, the short version:...

Ritu Madan | Jul 20, 2026

Extending the Optimizely Product Recommendations Feed to Include Custom Product Types

A practical way to extend the Optimizely Product Recommendations catalog feed so the export scheduled job also includes custom catalog types, like...

Wojciech Seweryn | Jul 20, 2026 |

Parallel Development in Optimizely CMS SaaS: A Smarter Way to Push Content Models

When Optimizely shipped the JavaScript SDK and CLI for CMS SaaS, they gave developers something pretty cool — a code-first workflow for content...

Vipin Banka | Jul 20, 2026

Fixing index_not_found_exception After Purging External Data in Optimizely Graph

The Scenario: Indexing External Data When working with Optimizely Content Graph, indexing external data is a straightforward process. Synchronize...

Akash Borkar | Jul 16, 2026