Most of us here treat deletion as a database problem: the row goes away and the job is done. Digital forensics has spent thirty years demonstrating that the row is only one of the places that data lives, and I think the field has a lot to teach anyone who ships a delete endpoint.
Deleting usually unlinks rather than erases
On a filesystem the blocks stay until something overwrites them. In a database the page still holds the old bytes until vacuum or compaction runs. On an SSD, wear levelling means the physical page you wanted gone can sit untouched in a block that never gets rewritten, which is why secure erase on flash is a firmware command rather than a loop that writes zeros.
The copies you did not think about
Write ahead logs. Replication streams. Last night's backup. The search index. The analytics warehouse. The CDN. The error tracker that captured a full request body six months ago. The log line where somebody printed the whole object while debugging. Knowing where those copies come to rest is most of what digital forensics actually does.
Why this matters if you are shipping software
A delete endpoint that satisfies the user request but leaves the record in three downstream systems is a compliance problem under any right to erasure regime, and it is a breach problem too, because the copy you forgot about is the copy that leaks.
What works
Treat deletion as a fan out, not an operation. Write down every system that receives the record, and make deletion a job that visits each one.
Encrypt per subject and delete the key where you can. Crypto shredding turns an unbounded search problem into deleting one small secret, which is the only approach that scales across immutable backups.
Keep a tombstone. You need to be able to prove the deletion happened, so the audit trail has to outlive the data itself. That is the same chain of custody idea a lab runs on.
Test it the way an examiner would. Write the record, delete it, then go hunting for it everywhere you can think of. You will find it somewhere on the first attempt.
Digital forensics is the fastest growing branch of the field for exactly this reason: the number of places a byte comes to rest keeps going up. If you want the wider picture of how the discipline works, from chain of custody through to the analysis side, this guide to forensic science walks through the whole field.
The short version is that if you cannot say where every copy of a record lives, you cannot delete it, and whoever does the forensics later will find the one you missed.