Clean your Odoo database from remnants of modules, models, columns and tables left by uninstalled modules (prior to 7.0) or a homebrew database upgrade to a new major version of Odoo.
Caution! This module is potentially harmful and can easily destroy the integrity of your data. Do not use if you are not entirely comfortable with the technical details of the Odoo data model of all the modules that have ever been installed on your database, and do not purge any module, model, column or table if you do not know exactly what you are doing.
auto_awesome What this module does
AI-generated from the code · Odoo 19.0Adds a 'Database cleanup' section under Settings > Technical where administrators can find and remove leftovers of uninstalled modules: obsolete modules, models, fields, columns, tables, data entries and menu entries, and create missing database indexes.
This module gives administrators a set of cleanup wizards, all grouped in a new 'Database cleanup' menu under Settings > Technical, visible only to system administrators.
Each wizard first scans the database and lists what it considers leftover, then lets you purge items one by one or all at once: - Purge obsolete modules: modules recorded in Odoo whose code is no longer present on the server; installed ones are uninstalled first, then their records are removed. - Purge obsolete models: models registered in Odoo that no longer exist in the system; related constraints, relations and attachments references are cleaned up too. - Purge obsolete fields: field definitions that no longer match a real field on their model; the field and, where relevant, its database column are dropped. - Purge obsolete columns: database columns that no longer correspond to any field of the table. - Purge obsolete tables: SQL tables and views that are not used by any model or many-to-many relation (a few internal tables are protected). - Purge obsolete data entries: external identifiers pointing to missing models or missing records. - Purge obsolete menu entries: menus whose action or target model no longer exists. - Create missing indexes: lists fields marked as indexed whose database index is absent and creates it.
Only system administrators can create these cleanup lines; each purge action must be confirmed manually and marks the line as done. The module also makes standard uninstall routines tolerate references to models that no longer exist.
Depends on
Models and fields (20)
- ir.model · extends an existing model
- ir.model.fields · extends an existing model
- cleanup.purge.line · new modelname, purged, wizard_id
- cleanup.purge.wizard · new modelpurge_line_ids
- cleanup.purge.line.data · new modeldata_id, wizard_id
- cleanup.purge.line.menu · new modelmenu_id, wizard_id
- cleanup.purge.line.field · new modelfield_id, model_id, wizard_id, model_name (Model Technical Name)
- cleanup.purge.line.model · new modelwizard_id
- cleanup.purge.line.table · new modelwizard_id, table_type
- cleanup.purge.line.column · new modelmodel_id, wizard_id
- cleanup.purge.line.module · new modelwizard_id
- cleanup.purge.wizard.data · new modelpurge_line_ids
- cleanup.purge.wizard.menu · new modelpurge_line_ids
- cleanup.purge.wizard.field · new modelpurge_line_ids
- cleanup.purge.wizard.model · new modelpurge_line_ids
- cleanup.purge.wizard.table · new modelpurge_line_ids
- cleanup.create_indexes.line · new modelpurged (Created), field_id, wizard_id
- cleanup.purge.wizard.column · new modelpurge_line_ids
- cleanup.purge.wizard.module · new modelpurge_line_ids
- cleanup.create_indexes.wizard · new modelpurge_line_ids
Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. The module is very large and only part of the code was read. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 8 confirmed, 1 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/server-tools.
terminal Installation and usage
OCA documentation · Odoo 19.0Usage
Source · Odoo 19.0After installation of this module, go to the Settings menu -\> Technical -\> Database cleanup. This menu is only available to members of the Settings group. Go through the modules, models, columns and tables entries under this menu (in that order) and find out if there is orphaned data in your database. You can either delete entries by line, or sweep all entries in one big step (if you are really confident).
[](https://runbot.odoo-community.org/runbot/149/11.0)
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.