Remove_stale_contenttypes Jun 2026

The taste of malabar. Ready in Seconds!

Discover More

Introduced in Django 1.11, this management command scans your INSTALLED_APPS and compares them against the records in your django_content_type table. It identifies records that exist in the database but have no corresponding model in the code.

class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0001_initial'), ]

Cleans up orphaned entries in Django’s ContentType table that no longer correspond to installed models (e.g., after a model’s app is removed or a model is deleted).