What Database Purge Wizard does
See every orphan table, column, record and file in a dry-run report, pick what to remove, confirm with the database name and keep a SQL script to restore it.
Dry-run report and safe purge of orphan tables, columns, models, fields, external ids, menus, views, stale defaults, orphan attachments, filestore garbage and old logs, with typed confirmation and a downloadable SQL restore script.
- Dry-run report
- Typed confirmation
- SQL restore script
- Filestore
Features
Scan
Run a dry scan. Every category is listed with the number of rows and the disk size it holds. Nothing is changed.
Select
Open the findings, filter by impact and select the lines you want, or purge everything that loses no data.
Purge
Type the database name. Each item is checked again and purged on its own, with a log and a restore script.
Orphan tables and views
Tables and SQL views no model of your installed apps uses, with row count and disk size. Empty ones are marked safe.
Columns of removed fields
Leftover columns on live tables, with the number of filled cells and their size, so you see what would be lost.
Models, fields and external ids
Model and field records, external ids and module records that an uninstall should have removed.
Menus, actions and views
Menus, actions and views that point to a model that no longer exists or belong to a module you removed.
Records of removed modules
Data-file records such as categories, groups and rules that the removed module created.
Stale default values
Default values stored for fields that are gone.
Orphan attachments
Attachments of removed models, of deleted records and of fields that no longer exist, grouped with their size.
Filestore garbage
Files on disk that no attachment refers to. Recent files and files Odoo is still handling are never listed.
Old logs and failed emails
Log entries and failed or cancelled emails older than the number of days you choose.
Dry run first
A scan only reads. You get a report per category with counts and sizes before anything is changed.
Type the database name
Nothing is purged until you type the name of the database. Only system administrators can open the app.
Checked again, item by item
Right before an item is purged it is looked up again. If it became legitimate in the meantime it is left alone.
Screens



Questions about Database Purge Wizard
Is it safe to run on a production database?
A scan never changes anything. Purging asks you to type the database name, writes a restore script and logs every item. Still take your usual full backup first, as you would before any database maintenance.
Can it remove something an installed app needs?
Items owned by an installed module, core tables and tables owned by database extensions are never listed, and each item is checked against the live registry again right before it is purged.
What if the restore script gets too big?
You set a size limit on the scan. Items that do not fit are skipped unless you explicitly accept purging them without a full backup.
Does it delete files from the filestore?
Only files that no attachment refers to, older than the grace period you set (24 hours by default) and not waiting in Odoo's own clean-up list. Files cannot be put in an SQL script, so they are not part of the restore script.
Who can use it?
System administrators only. The menu is under Settings.
