Monday to Saturday 9:00–19:00, Sunday closedFree pickup anywhere in Germany · drop-off in Berlin and Hamburg

SSD and flash

Deleted files on an SSD: why TRIM usually erases them for good

On a hard drive, a deleted file stays on the platter until something overwrites it. On an SSD, the operating system tells the drive within seconds which blocks are free, and the controller then often answers every read of those blocks with zeros. That is why recovery tools that work well on hard drives often find nothing on an SSD. There are exceptions, and they decide whether a recovery is worth trying.

Published 3 min readBy Mirush Murataj

Cover of the RecDati guide: Deleted files on an SSD: why TRIM usually erases them for good
With TRIM active, an SSD usually returns zeros for deleted blocks after seconds or minutes.

In short

  • With TRIM active, an SSD usually returns zeros for deleted blocks after seconds or minutes.
  • Deleted data can survive when TRIM never reached the drive: some USB enclosures, hardware RAID, TRIM switched off.
  • Stop using the computer and do not install recovery software on the same SSD.

What TRIM does

When you empty the recycle bin, the file system marks the clusters of the file as free. On a hard drive, nothing else happens. On an SSD, the operating system also sends a command to the drive: TRIM on SATA, Deallocate on NVMe, UNMAP on SAS. The command lists the logical blocks that no longer hold valid data.

The controller removes these blocks from its mapping table, the flash translation layer (FTL). The flash cells still hold the old charge for a while, but no address points to them any more. Later, garbage collection erases the whole flash block, usually several megabytes at once, to make room for new writes.

Why recovery software finds only zeros

Most SSDs give a fixed answer for trimmed blocks. A SATA drive reports in its identification data whether it supports DRAT (deterministic data after TRIM) and RZAT (zeros after TRIM). An NVMe drive reports the same in the DLFEAT field. A drive with RZAT returns zeros for every trimmed block as soon as the mapping is gone, whether the cells were already erased or not.

Recovery software reads through the normal interface, so it sees exactly these zeros. Reading the flash chips directly does not help either: the data is spread over many chips, scrambled, and on most modern SSDs encrypted with a key that lives in the controller.

When deleted data can survive

SituationChance of recovery
SSD in a USB enclosure that does not pass TRIM on (older USB bridges without UASP)Good, as long as little was written afterwards
SSD behind a hardware RAID controller that does not pass TRIM onGood
TRIM switched off in the operating systemGood
Linux server that trims once a week with fstrim, and the timer has not run yetGood, but only for a few days
Quick format of an SSD with TRIM activeLow: the format trims the whole partition
Files deleted on a current Windows, macOS or Linux PC with an internal SSDLow, after a few minutes very low
The SSD failed, but the files were never deletedGood: the problem is the controller, not TRIM

Windows shows the setting with fsutil behavior query DisableDeleteNotify. The value 0 means TRIM is active. Many Linux distributions trim once a week with the fstrim timer, or at once if the file system is mounted with the discard option. macOS uses TRIM on all Apple SSDs.

What to do right now

  1. Stop working on the computer. Every write can start garbage collection.
  2. Do not install a recovery program on the same SSD, and never save recovered files to it.
  3. If the SSD is external, remove it safely and leave it unplugged.
  4. Write down what was deleted, when, and on which system.
  5. Look for other copies first: the recycle bin, File History or Time Machine, the version history of OneDrive or iCloud, snapshots on a NAS.

When a lab can help

A lab is worth asking when the SSD sat behind a USB bridge or a RAID controller, when TRIM was switched off, or when the drive itself failed and the files were never deleted. The lab first makes a complete image of the drive and then searches it for file system structures and file signatures. If the files were deleted on a modern PC with TRIM, an honest lab tells you after the free diagnosis that the blocks read as zeros, before any cost arises.

More on SSDs: SSD and NVMe data recovery. If your SSD keeps disconnecting: Portable SSD keeps disconnecting: cable, enclosure or failing flash?.

Frequently asked questions

Does formatting make a difference?

A quick format on an SSD with TRIM active trims the whole partition, so the result is the same as deleting everything. A secure erase or sanitize command erases every flash cell, and nothing can be recovered after it.

Is an NVMe drive different from a SATA SSD?

The mechanism is the same. NVMe calls the command Deallocate instead of TRIM, and the drive reports in the DLFEAT field what it returns for deallocated blocks.

Can recovery software ever work on an SSD?

Yes, when data was lost without TRIM: a damaged file system, a drive in an enclosure that does not pass TRIM on, or TRIM switched off. For files deleted normally on an internal SSD, it usually finds only empty space.

Official sources and useful links

Are these files business-critical?

Stop every repair attempt that writes to the disks. The lab diagnosis is free and you receive a fixed price before anything is done.

Request a free diagnosis SSD and NVMe data recovery

Switch the device off, leave it as it is and let the lab have a look first.

Get a price