Deleting a file on a modern computer is instantaneous: no noise, no waiting. Inside, though, almost nothing is actually erased. What happens is closer to crossing a line out of an address book than to destroying the paper, and on a solid-state drive that difference has very concrete technical consequences: wear, long-term performance, and an irreversible form of deletion called crypto-erase.
First, the file system: the address goes, the content stays
When the operating system deletes a file, it usually only touches metadata. In a file system such as ext4, XFS or NTFS, the name disappears from the directory and the control block —the inode on Unix— is marked as free: its link count drops to zero, its data blocks are flagged as available and that space joins the reusable list. The content is still physically where it was until another write overwrites it. That is why forensic tools can recover files, and also why the sensible advice for sensitive data is not “delete” but overwrite, or destroy the encryption key.
On a mechanical drive, overwriting makes sense: the magnetic head writes over the same track again. In flash memory, the very idea of “writing over” does not exist.
NAND memory: reprogramming a cell means emptying it first
An SSD stores data in NAND memory cells, transistors with a floating gate (or a charge trap, in modern chips) that hold electrons. The logical value depends on how much charge is trapped: an SLC cell distinguishes two levels (one bit); TLC, eight levels (three bits per cell), and QLC, sixteen (four bits). The more levels, the cheaper the gigabyte and the more delicate the read, because the voltage margins between states get narrower.
Cells are read and written in pages, 4 to 16 KiB depending on the design, but they can only be erased in whole blocks, which group hundreds of pages (typically 256 to 1,024, i.e. 3 to 24 MiB of physical capacity). And here is the key point: programming an already charged cell requires returning it to its neutral state first. Writing therefore often involves a preceding erase cycle, and every program/erase cycle (P/E cycles) wears down the oxide that isolates the floating gate. A consumer TLC survives on the order of 1,000 to 3,000 cycles; a QLC may be down to a few hundred.
The layer that translates: the FTL
The operating system knows nothing about any of this. It believes it is talking to a disk of numbered logical blocks, the LBA addresses. Turning those logical addresses into specific physical pages, and spreading them so the same cells are not always worn down, is the job of the flash translation layer (FTL), the controller firmware. The FTL keeps a translation table —in its most capable variant, one entry per logical page— and serves it from internal RAM or from a cache in the host’s memory, the NVMe Host Memory Buffer. When you write to an address that is already in use, the controller does not rewrite the old page: it records the new one in a free page, points the translation there and leaves the previous page as garbage. This out-of-place update is the central mechanism of every SSD.
Garbage collection, write amplification and TRIM
The price of that design is that garbage piles up. When the controller needs free blocks, it runs garbage collection: it reads the still-valid pages of a block, copies them elsewhere and erases the whole block so it can be reused. If it copies a lot to free up little, the drive writes internally several times what the user asked for. That ratio is measured as write amplification (WAF), and it is contained by reserving a margin of hidden capacity, the over-provisioning —the usual 7% between commercial and usable gigabytes— and with the TRIM command (called Deallocate or Dataset Management in NVMe). With TRIM, the system tells the SSD which logical addresses no longer hold data: the controller marks those pages invalid and garbage collection can stop copying them. Fewer copies, less WAF, and a less brutal performance drop when the drive fills up.
To be precise: TRIM does not erase anything either. It only invalidates the translation. The electrons stay in the cell until the block is erased or reused.
What happens over time: retention, disturb and refresh
Beyond wear, a cell’s charge slowly leaks away. Over the years, and above all with heat, read thresholds shift and pages become harder to tell apart. The controller compensates with powerful error-correcting codes —LDPC in current drives, with retries and adjusted read voltages— and with refresh routines that rewrite pages left untouched for a long time. Another effect, read disturb, appears when the same area is read many times: repeated reads slightly disturb neighbouring cells, so the firmware also re-reads and repairs those blocks from time to time. Retention specifications (JEDEC’s, for the professional market) are measured with the drive powered off and at specific temperatures, and they worsen with accumulated wear: a heavily used SSD, powered off and warm for months, can lose data even though it is intact.
The deletion that does work: destroying the key
Since overwriting the whole medium is not viable —part of the capacity is invisible to the system and the FTL decides where each thing lives— the industry took another route: always encrypt. Self-encrypting drives (SED, with the TCG Opal or IEEE 1667 specifications) encrypt every block with an internal key. Secure erase, ATA’s sanitize or NVMe’s crypto-erase, does not touch the data: it regenerates that key. From that instant on, everything written before is undecipherable noise. That is why data sanitisation guidelines such as NIST SP 800-88 accept cryptographic erase as a valid purge method.
Conclusion
Deleting a file is, in the end, an accounting operation: the file system crosses out an entry, the SSD invalidates a translation, and both let the physical side lapse on its own. Understanding that separation between the logical and the physical explains why a full drive slows down, why a second-hand SSD deserves careful handling, and why the only truly immediate deletion is the one that destroys the key that made the data readable.






