Call Us Free 773-759-7945
user heart cart0
order Free Shipping on Orders Over $100

This is what happens to a file when you delete it from your SSD

Deleting a file means it should be gone for good. That's why most people assume that when you delete a file and then remove it from your Bin (macOS) or Recycle Bin (Windows), it's gone forever. In reality, that's not always the case because of what happens under the hood when you delete a file.


That's why you should know how to permanently delete files from your PC before putting it up for sale. Unlike traditional hard disk drives (HDDs), solid state drives (SSDs) handle file deletion differently. And how they handle deletion significantly matters, especially in relation to data recovery and privacy.

How file deletion actually works (on a hard drive)

What really happens when you click "Delete"

The operating system (OS) your computer runs handles file deletion. After all, the operating system is the interface that enables you to get the hardware to perform tasks. When you click Delete, the general concept is that the OS won't permanently remove that data from the disk.

Related video: How To Install Or Replace An SSD Yourself Easily? (TMH Tech)

Instead, the OS only removes the reference (or pointer, in programming lingo) to that file from the file system index. By doing so, the file or folder will no longer appear in the original location because the OS can't see it. Additionally, by removing the reference to that file in the file system's index, that space is marked as available for use; hence, new data can be written to it.

As such, this makes it look like the file has been removed from the disk when it still exists—there's just no reference for it to be visible. Assuming you had 240GB of free storage and deleted a 10GB file, your system will now show you have 250GB of available space, even though that file's data is still on the drive until it's overwritten.

What this means is that the deleted file is not fully gone and can still be recovered. It's only when the data is overwritten that it becomes unrecoverable. However, SSDs don't play by the same rules because of how they store and manage storage cells.


How SSDs store and erase data differently

SSDs don't overwrite data like traditional HDDs

Unlike traditional HDDs, SSDs use NAND flash storage, which organizes data into blocks and pages. This storage structure plays a key role in differentiating how SSDs store and erase data in comparison to HDDs. Another key component that makes SSDs unique is that they have a controller that manages the writing, reading, and deletion processes.

Because of these two factors, the deletion process on SSDs is also quite different. When you delete a file on an SSD, the operating system sends a TRIM command to inform the disk which blocks of data are no longer needed and should be cleared. However, the SSD won't immediately delete data stored in those blocks. Instead, it will only mark those blocks as free. Most importantly, SSDs must erase data from blocks before new data can be written to them—SSDs don't overwrite data like HDDs.

So blocks marked as free have to be deleted by the SSD's internal garbage collection process. To delete the blocks, the SSD's garbage collection process runs in the background to consolidate valid data and erase blocks that have been marked as free since the last process. This garbage collection process also plays a key role in ensuring your SSD performs well and lasts longer through wear leveling.


Can you recover deleted files from an SSD?

It really depends

File recovery tools depend on how the data is deleted to work. When you use a file recovery tool to recover deleted data, it will scan the drive for any files that are intact but don't have a reference. The recovery tool tries to restore the references to those files so they can be accessible again.

On an SSD, whether you can recover deleted data depends on whether TRIM (typically enabled by default on modern operating systems) has processed the files. If you try recovery before the garbage collection process runs, you can get your files back. However, if the garbage collection process has already erased the blocks, you won't be able to recover deleted data.

However, the garbage collection processes often run after a short period. As a result, any data that you erase is cleared relatively quickly. This reduces the chances of recovering deleted data on SSDs. If you use secure deletion to erase your SSD, it becomes impossible to recover anything, as blocks are cleared almost instantaneously.


Deleting data may not mean it's gone forever

While the idea of deleting data should mean it's gone and can't be recovered, it's not always the case—your SSD only marks the blocks containing the deleted data as ready for deletion. It's only when the garbage collection process runs that the data is permanently deleted.

Fortunately (or unfortunately, depending on the situation), the garbage collection process typically doesn't take long to run after you delete a file. Because of this, if you accidentally delete a file, you might never be able to recover it.

Leave a comment

Please note, comments must be approved before they are published