Skip to content

Soft Deletes vs Hard Deletes

Tradeoffs, implementation patterns, when each is appropriate, and GDPR implications.

14 min readdatabases, soft-deletes, data-patterns, gdpr, architecture

A user clicks "Delete my account." Your application runs DELETE FROM users WHERE id = $1. The row vanishes. Gone forever. Three weeks later, the user contacts support: "I changed my mind, can you restore my account?" Your answer depends entirely on whether you used a soft delete or a hard delete.

Hard delete removes the row from the database permanently. It's gone. SELECT * FROM users WHERE id = $1 returns nothing.

Soft delete marks the row as deleted without actually removing it. The data is still there, invisible to normal queries but recoverable when needed.

This is one of the most common architectural decisions in application development, and the right choice depends on your specific requirements — not on which one feels "cleaner."

Hard Deletes: Simple and Permanent

This lesson is part of the Guild Member curriculum. Plans start at $29/mo.