Full answer
Steps:
- Inventory: list tables and columns with personal data. Foreign keys help find dependants; free-text columns and JSON need a manual check.
- Decide per table: delete (sessions, preferences), anonymise (orders kept for accounting, with name and address replaced), or retain with a legal basis (invoices for tax periods).
- Execute in one transaction where possible, with
ON DELETE CASCADEonly where cascading is clearly intended. - Downstream systems: queue deletions for search indexes, warehouses and third-party processors.
- Backups: usually not edited, but expire on a schedule; record the request so restored data is deleted again after a restore.
- Record that the request was completed, without keeping the deleted data.
Soft delete alone does not satisfy such a request, because the data is still stored. Legal requirements vary by jurisdiction, so the exact rules come from the organisation's privacy policy.
Key points
- Maintain an inventory of personal data
- Delete, anonymise or retain per table
- Handle downstream copies
- Plan for backups and restores
- Soft delete is not deletion
Common mistakes
- Deleting the user row and leaving orphans with personal data
- Forgetting logs and analytics copies
Follow-ups
- How does anonymisation differ from pseudonymisation?
- How would you test that deletion is complete?
Tips
- Separate delete, anonymise and retain