Deletion cleanup

Fieldbook keeps deleted content and people recoverable for 30 days. An hourly worker then removes eligible records and unused media. An installer connects and verifies the worker once; everyday deletion needs no database work.

Deleting content or a person removes it from active use and starts a 30-day recovery window. Administrators can restore records from Recently deleted during that window. See Delete and restore records.

Automatic cleanup

The database setup command installs the hourly schedule and connects it to the deployed application. Everyday deletion and restoration need no database commands or copied worker credential.

After the recovery window, the worker removes eligible records and retries failed cleanup. It removes media only when no retained Fieldbook record uses it. Restoration ends at the deadline even if a failed provider request delays permanent removal.

If cleanup needs attention

Recently deleted shows an administrator warning when automatic cleanup needs attention. Check that the Supabase job is active, its destination matches the application, and the worker request received a successful response. A Cron History entry alone confirms that scheduling SQL ran, rather than that the application accepted the request.

Use the worker response, application logs and the record's error to investigate. Do not delete database rows or shorten recovery dates to force cleanup.

If the application's address changes, update the cleanup destination in the matching Supabase project's SQL editor:

SQL
update public.fb_cleanup_config
set endpoint = 'https://YOUR-FIELDBOOK-HOST/api/internal/purge-deleted'
where id = true;

Use the same origin as FIELDBOOK_URL.

Cleanup does not erase exported files, external media, provider logs, backups or copies held by an AI client. Their retention belongs to the operator.