MobDojoStart learning free

How Computers Work · Files & Storage Deep Dive · Lesson 3 of 5

What Delete Really Does on a Drive

Why deleted files can linger on a hard drive, and what makes them unreadable.

10 min50 XPLab in Pro

Delete only marks the space as free

When you empty the Recycle Bin, the file seems to vanish. On many drives, the data is still sitting there for a while.

Remember the file system, the index that tells the computer where each file lives. When you delete a file, the computer usually doesn't wipe the data itself. It removes the file from the index and marks that spot as free space, room that new files are allowed to use.

Think of a library that pulls a book's card from its catalog but leaves the book on the shelf. Nobody can find it by searching anymore. But someone walking the shelves might still spot it, until a new book takes its place.

On a hard disk drive, that is exactly what happens. The old data stays on the platter until new files happen to be written over it. That can take days, months or longer, depending on how full and busy the drive is.

Recovery tools are programs that scan a drive for this leftover data and rebuild deleted files. They have honest uses. People use them to rescue family photos they deleted by mistake, and repair shops use them on damaged drives.

It also means an old hard drive can hold more than its owner thinks. If you sell or give away a computer with a hard drive, files you deleted years ago could be pieced back together by whoever gets it next.

If you ever delete something important by mistake, stop using that drive as much as you can. Every new file you save could land right on top of the old one.

TRIM on SSDs, and encryption for leftovers

SSDs handle deleted files differently from hard drives.

Flash chips can't simply write new data on top of old data. A spot has to be cleared first. So when you delete a file, Windows sends the SSD a short message called TRIM. TRIM tells the drive which space is no longer in use, so the drive can clear it during its own cleanup, often soon after.

This keeps the SSD fast. It also means deleted files on an SSD are usually much harder to recover than on a hard drive. But usually is not always, so don't count on TRIM alone to protect your privacy.

The stronger protection is encryption. Encryption scrambles data so it can only be read with the right key. The key is the secret that unscrambles it. On Windows, this is BitLocker, or Device Encryption on many Windows 11 Home computers. On a Mac, it is FileVault.

With encryption on, everything on the drive is stored scrambled, including the leftovers of deleted files. Without the key, recovery tools find only gibberish. Once the key is destroyed, that data is useless for good.

You met this idea in the Mobile lessons on deleted vs reset. Modern phones encrypt everything, so a factory reset throws away the key and the old data becomes unreadable. Computers work the same way when encryption is turned on.

To check on Windows 11, open Settings > Privacy & security and look for Device encryption. On Windows Pro, search Start for Manage BitLocker. On a Mac, open System Settings > Privacy & Security and scroll to FileVault.

Test yourself

Can you answer these?

  1. You empty the Recycle Bin on a desktop with a hard disk drive. What happens to the deleted file's data right away?
  2. You delete a file on an SSD. What is the name of the message Windows sends so the drive knows that space can be cleared?

Answer them in the app to earn 50 XP (Pro).

Answer in the app