keepcalculator

06 Numbers and Powers

Securely Delete Files: Real Erasure Methods

Card No. 06·28113 · Updated · Standard formula, shown below

Average pace 5.00 min/km
Average speed
12.00 km/h
Result
Finish time
50 min
You entered
Distance
10 km
You entered
You enter
Finish time, Distance
You get
Average pace, Average speed
Rounding
2 dp

To securely delete files means to overwrite the data so it cannot be recovered with software or forensic tools. Simply moving a file to the Recycle Bin or Trash does not erase it; the actual data remains on the drive until overwritten. This article explains what secure deletion really does, which methods work for which storage types, and how to choose the right one.

Why Deleting Isn’t Erasing

When you delete a file normally, the operating system only removes the pointer to the data in the file system. The space is marked as available, but the actual 1s and 0s remain on the storage medium until something else writes over them. This is why deleted files can be recovered with tools like PhotoRec or Recuva. The only way to make the data unrecoverable is to overwrite it, destroy the medium, or use encryption so the data is useless without the key.

For solid-state drives (SSDs), the situation is more complex. SSDs use wear leveling, which spreads writes across all memory cells to prolong the drive’s life. This means that overwriting a file’s logical address may not overwrite the physical cells where the data resides. The drive’s controller may have moved the data to a different physical location, leaving the old copy intact in a block that is no longer mapped. Consequently, traditional overwriting software is largely ineffective on SSDs, and the recommended method is the drive’s built-in secure erase command (ATA Secure Erase) or full-disk encryption.

How Overwriting Works

Overwriting-based secure deletion tools write patterns of data over the space where the file was stored. The idea is that each pass replaces the original bits with new ones, making the original data impossible to reconstruct. Common patterns include writing zeros, ones, or random data, often in multiple passes.

The number of passes required is a subject of debate. The original US Department of Defense standard (DoD 5220.22-M) specified three passes: one with a fixed pattern, one with its complement, and one with random data. However, modern research and the National Institute of Standards and Technology (NIST) suggest that for most drives, a single pass of zeros or random data is sufficient to prevent recovery with any known technique. The main exception is for extremely high-security environments, where physical destruction is recommended.

It’s important to note that overwriting only works on traditional hard disk drives (HDDs) and other magnetic media. It does not work reliably on SSDs, as explained above, nor on flash drives or memory cards, which have the same wear-leveling behavior.

Choosing a Secure Deletion Method

The right method depends on your storage type and threat model. Here’s a practical guide:

  • Hard Disk Drives (HDDs): Use a software tool that overwrites the free space or specific files. Tools like Eraser (Windows), BleachBit (cross-platform), or the built-in shred command on Linux are effective. One pass with random data is generally sufficient.
  • Solid-State Drives (SSDs) and USB Flash Drives: Use the drive’s built-in secure erase feature, usually accessible via the manufacturer’s utility or the hdparm command on Linux. This resets all cells to an empty state. Alternatively, full-disk encryption is the best long-term strategy: if the drive is encrypted and you delete the encryption key, the data becomes effectively unrecoverable.
  • Cloud Storage: When you delete a file from cloud services like Google Drive or Dropbox, the provider may retain copies for a period. You cannot securely overwrite data on a server you don’t control. Your only option is to ensure the file was encrypted before upload, so the provider only holds ciphertext.
  • Optical Discs (CDs, DVDs): Rewritable discs can be overwritten with a tool like dvd+rw-format on Linux or the built-in Windows formatting. Once-overwritten data is gone. For write-once discs, physical destruction is the only option.

Common Mistakes and Misconceptions

One of the most common mistakes is assuming that emptying the Recycle Bin permanently deletes files. It does not; it merely removes the pointer, and the data remains recoverable until overwritten. Another misconception is that formatting a drive securely erases it. A standard format only writes a new file system, leaving most of the old data intact. A full format on Windows writes zeros to the entire drive, which is more secure, but on SSDs it’s still not guaranteed due to wear leveling.

Another issue is using overwriting software on an SSD. Not only is it ineffective, but it also wastes write cycles, shortening the drive’s lifespan. Many users also forget that temporary files, browser caches, and system restore points can contain copies of the data they want to delete. A thorough cleanup should include these areas.

Finally, some people believe that multiple passes are always more secure. While it was true for older, high-density drives, modern drives are not susceptible to the magnetic force microscopy techniques that made multiple passes necessary. NIST Special Publication 800-88 states that a single overwrite is sufficient for most sanitization purposes.

Encryption as an Alternative

Full-disk encryption (FDE) is often the best defense against data recovery. If you encrypt your entire drive, all data is stored as ciphertext. When you delete a file, you don’t need to worry about overwriting the physical data because without the encryption key, the data is meaningless. To securely delete a file on an encrypted drive, you can simply delete it and then securely delete the encryption key (e.g., by wiping the drive’s encryption header). This is the approach recommended by many security experts.

For individual files, you can use encrypted containers (like VeraCrypt) or encrypt files before storing them. If an encrypted file is deleted, the ciphertext remains, but it is computationally infeasible to recover the plaintext without the key. This is why encryption is considered a more robust solution than overwriting, especially on SSDs.

Physical Destruction and Other Methods

When software methods are not possible or sufficient, physical destruction is the most reliable way to ensure data cannot be recovered. For HDDs, this can involve shredding the platters, drilling holes through them, or using a degausser to destroy the magnetic field. For SSDs, shredding or incineration is necessary because the memory chips can retain data even without power.

Degaussing is effective for magnetic media but does not work on SSDs, which use flash memory. For optical discs, shredding or microwaving (not recommended) are options. In a corporate or government setting, certified destruction services are often used, but for personal use, a hammer and drill are usually sufficient to render a drive unrecoverable.

Frequently Asked Questions

Does emptying the Recycle Bin securely delete files?

No. Emptying the Recycle Bin only removes the file system pointers. The actual data remains on the drive and can be recovered with standard file recovery tools until it is overwritten by new data.

Can I securely delete files on an SSD with overwriting software?

No, overwriting software is not reliable on SSDs due to wear leveling. The drive may not write to the same physical cells where the data is stored. Use the drive’s built-in secure erase command or rely on full-disk encryption.

How many passes are needed to securely overwrite a hard drive?

For modern hard drives, a single pass with random data or zeros is sufficient to prevent recovery with any known technique. The multiple-pass DoD standard is outdated and unnecessary for most users.

Is formatting a drive the same as securely erasing it?

No. A quick format only creates a new file system, leaving old data intact. A full format writes zeros to the entire drive, which is more secure, but on SSDs it is still not guaranteed due to wear leveling.

What is the best way to securely delete files on a cloud service?

You cannot overwrite data on a cloud server. The only reliable method is to ensure the file was encrypted before upload, so the provider only holds ciphertext. When you delete the file, the ciphertext is useless without your key.

Does secure deletion work on USB flash drives?

USB flash drives use flash memory, so they have the same wear-leveling issue as SSDs. Overwriting is not reliable. Use the drive’s secure erase command if available, or physically destroy the drive if it contains highly sensitive data.

Related

Formula used
in t | Finish time | min | 50 | 0
in d | Distance | km | 10 | 0 | 100000
out pace | Average pace | min/km | t / d | 2
out speed | Average speed | km/h | d / (t / 60) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →