Data Deletion and Retention Enforcement

A retention policy is a promise: analytics events are kept for 13 months, support tickets for two years, a closed account's uploads for 30 days. Enforcement is the machinery that keeps the promise — and it is where most organizations quietly fail. The policy says 13 months, but the warehouse table was never given an expiry. The account was deleted from the main database, but the search index still returns the profile. Logs were created with the platform's default of keeping everything forever. A lakehouse DELETE ran, but the rows still sit in time-travel snapshots.

Enforcement means every store that holds a dataset has a mechanism that removes data on schedule, every erasure request becomes a tracked workflow that reaches every system, and someone can prove both happened. This guide covers that machinery; the policy side — choosing periods, soft versus hard delete, anonymization, crypto-shredding, and legal holds — is in Data Retention & Deletion.

TL;DR

Quick Example

Three datasets whose retention is enforced by the storage itself, so no job has to remember to run:

Each setting is declared in code, reviewed like any other change, and enforced continuously — the most reliable kind of retention.

Core Concepts

An Enforcement Mechanism for Every Store

Lakehouse Tables Keep History

Table formats such as Delta Lake and Apache Iceberg support DELETE, but deletes create a new snapshot; older snapshots — and the files they reference — still contain the rows for time travel. Physical removal needs a second step:

Managed warehouses have similar features — Snowflake's Time Travel and Fail-safe keep changed data for a period after deletion — so retention commitments must include those windows. See Data Lakehouse and Apache Iceberg.

The Erasure Workflow

An erasure request touches many systems owned by many teams. Treat it as a tracked workflow:

  1. Receive and verify the request, confirming the requester's identity.
  2. Check legal holds and statutory retention; record any data that must be kept and why.
  3. Create a task per system from the data inventory — databases, indexes, analytics, vendors.
  4. Execute each task idempotently, with retries.
  5. Collect receipts: system, records affected, and time completed.
  6. Verify the subject no longer appears where it should not.
  7. Respond to the requester within the legal deadline — under the GDPR, one month, extendable by two further months for complex requests.

The deletion ledger records that a subject was erased, using a keyed hash or internal reference rather than personal data, so deletions can be re-applied if an older backup is ever restored.

Derived Data and Vendors

Deleting the source row is not enough when other systems copied it. Publish a deletion event that search indexers, caches, analytics pipelines, and feature stores consume, and call vendor deletion APIs — CRM, email, support, and analytics tools — as tasks in the same workflow. Contracts with processors should require deletion on request and confirmation.

Backups

Backups usually cannot be edited, especially immutable ones. The accepted approach is to keep backup retention short and bounded, restrict access to backups, and, whenever a backup is restored, replay the deletion ledger before the data is used again. See Immutable Backups and Restore Verification.

Proving Deletion

Overdue-Data Scans

For every dataset with a retention period, schedule a query that should always return nothing, and alert when it does:

Canary Subjects

Create synthetic test users that exist in every system — database, search, warehouse, CRM, email tool — and submit an erasure request for them on a schedule. An end-to-end test then checks each system for any remaining trace. When a new system is added without a deletion handler, the canary finds it.

Discovery and Reconciliation

Data inventories drift. Data discovery tools that scan for personal data in unexpected places — a new bucket, an analytics sandbox, a spreadsheet export — show where the inventory and reality disagree.

Evidence for Auditors

Keep receipts per request, logs of retention jobs and their counts, results of overdue scans, and metrics such as requests completed on time and tasks overdue. Deletion events should themselves be recorded in the audit log.

Best Practices

Attach Retention to the Dataset Definition

Record each dataset's retention class in the schema, data catalog, or infrastructure code where it is created, so expiry is configured at creation instead of retrofitted.

Make "No Retention Configured" Fail a Check

Policy checks in CI can reject log groups, buckets, and tables created without an expiry setting. Defaults that keep data forever are the most common enforcement gap.

Delete in Batches

Large deletions can lock tables, saturate replication, and spike load. Delete in small batches during quieter periods, and monitor progress like any other job.

Collect Less in the First Place

Every copy needs enforcement. Minimizing what is collected, and avoiding needless copies, shrinks the problem — see Privacy by Design.

Common Mistakes

A Policy With No Mechanism

Deleting the Source but Not the Copies

Lakehouse Deletes Without Snapshot Expiry

A Deletion Ledger Full of Personal Data

FAQ

How long do we have to complete an erasure request?

Under the GDPR, without undue delay and within one month, extendable by two further months for complex or numerous requests if the requester is told why. The CCPA allows 45 days, extendable once by another 45. Other laws differ, so check those that apply to you.

Must we delete data from backups immediately?

Generally not, if backups are kept for a short, defined period, protected, not used for everyday processing, and deletions are re-applied after any restore. Regulators have accepted this approach, but document it and confirm it with your privacy counsel.

Is a DELETE statement enough?

In a transactional database it removes the data from normal access, though storage is reclaimed later. In lakehouse tables and warehouses with time travel, deleted data stays readable through older snapshots until they expire, so retention and erasure commitments must include snapshot expiry.

How do we prove deletion to auditors?

With records: per-request receipts from every system, logs of scheduled retention jobs and their counts, scans showing no overdue data, and results of canary deletion tests. The evidence should show the process works continuously, not that it was run once.

What about personal data in third-party tools?

It is in scope. Include vendors in the inventory and the erasure workflow, use their deletion APIs where available, and make deletion obligations part of your data processing agreements.

Related Topics

References