ThisCalculator

Everyday

Completely Delete Files from Hard Drive Deleted Items?

Updated · Standard formula, shown below

Completely Delete Files from Hard Drive Deleted Items?

Yes, you can completely delete files from your hard drive’s deleted items (Recycle Bin on Windows, Trash on macOS), but the method depends on whether you need to prevent casual recovery or protect against data forensics. Simply emptying the Recycle Bin or Trash removes the file’s directory entry, but the actual data remains on the disk until overwritten. For true deletion, you must overwrite the space with new data or use a secure erase tool.

What Happens When You Delete a File?

When you delete a file and empty the Recycle Bin or Trash, the operating system marks the file’s space as available. The file’s name and metadata are removed from the file system index, but the actual 1s and 0s remain on the platter or flash memory. This is why recovery software like Recuva or PhotoRec can often restore “deleted� files. The data stays until the operating system writes new data over those sectors. On solid-state drives (SSDs), the controller may eventually erase blocks during garbage collection, but this is not immediate or guaranteed.

The key distinction is between logical deletion (removing the pointer) and physical deletion (actually erasing the data). Emptying the Recycle Bin only performs logical deletion. For physical deletion, you need to overwrite the data or use a secure erase command.

Why Can’t You Just “Empty the Trash� Forever?

Emptying the Recycle Bin or Trash does not guarantee that the file is gone. On traditional hard disk drives (HDDs), data is written in concentric tracks. When you overwrite a file, the new data is written over the old sectors, but there can be residual magnetic traces. Advanced recovery techniques can sometimes read these remnants. On SSDs, the problem is different: wear leveling spreads writes across all cells, so the physical location of a file’s data may be moved, and the old copy may remain in a block that hasn’t been erased yet. Simply overwriting the file’s logical address may not touch the physical cells where the data resides.

For most users, emptying the Recycle Bin is sufficient. But if you are selling a computer, giving it away, or disposing of sensitive documents, you need a more thorough method.

How to Completely Delete Files on Windows

Windows offers several built-in and third-party methods. The simplest is to use the built-in cipher command to overwrite free space. Here’s how:

  1. Open Command Prompt as administrator (search “cmd�, right-click, “Run as administrator�).
  2. Type cipher /w:C: and press Enter. This overwrites free space on the C: drive with three passes: 0x00, 0xFF, and random numbers. It does not touch existing files.
  3. Wait for the process to complete. It can take hours on large drives.

Alternatively, you can use a dedicated tool like Eraser (free, open-source) or CCleaner’s Drive Wiper. These tools overwrite free space with multiple passes (e.g., Gutmann method, DoD 5220.22-M). For a single file, you can right-click it, select “Eraser� (if installed), and choose a secure deletion method.

For SSDs, the built-in TRIM command helps. When you delete a file, Windows sends a TRIM command to the SSD, which tells the controller to erase the blocks. This happens automatically on most modern SSDs. However, if you want to be sure, you can use the SSD manufacturer’s secure erase utility (e.g., Samsung Magician, Intel SSD Toolbox). This performs a low-level erase of all data on the drive.

How to Completely Delete Files on macOS

macOS does not have a built-in “secure empty trash� option in recent versions (it was removed in OS X Yosemite). Instead, you can use the Disk Utility to securely erase free space on an HDD, or use the srm command (though it is deprecated and not recommended for SSDs). For an HDD:

  1. Open Disk Utility (Applications > Utilities).
  2. Select the drive (not the volume) and click “Erase�.
  3. Choose a format (APFS or Mac OS Extended) and click “Security Options�.
  4. Choose how many passes to overwrite (up to 7 passes). This will erase the entire drive, so back up first.

For deleting a single file securely on macOS, you can use a third-party tool like Permanent Eraser or FileShredder. These overwrite the file’s data before removing the pointer. On SSDs, the TRIM command is automatically enabled, so emptying the Trash is generally sufficient for casual deletion.

What About SSDs vs. HDDs?

SSDs and HDDs behave differently when it comes to deletion. On an HDD, data is stored magnetically, and overwriting with zeros or random data is effective. On an SSD, data is stored in NAND flash cells, and writes are done in blocks. Overwriting a file’s logical address may not physically erase the old data because the SSD controller may write new data to a different block. The old block remains until it is garbage-collected and erased. TRIM helps by telling the controller which blocks are no longer in use, allowing them to be erased in the background.

For SSDs, the most reliable way to completely delete all data is to use the ATA Secure Erase command, which is built into the drive’s firmware. Tools like Parted Magic (paid) or hdparm (Linux) can issue this command. It resets all cells to an erased state. This is the recommended method before selling or disposing of an SSD.

Common Mistakes and Misconceptions

  • Emptying Recycle Bin is enough for most people. True, but only if you don’t care about recovery by someone with forensic tools.
  • Overwriting free space once is enough. For HDDs, a single pass with zeros is generally considered sufficient for modern drives. The old “multiple passesâ€� myth comes from the era of MFM drives. However, for extreme paranoia, you can do 3 passes.
  • Deleting a file and then running a disk cleanup is the same. No, disk cleanup may not overwrite the data.
  • Formatting the drive completely erases data. A quick format only creates a new file system, leaving data intact. A full format on an HDD does a surface scan and may overwrite, but not always. On an SSD, a full format may not erase all cells.
  • TRIM is enabled by default on Windows and macOS. Yes, but only if the SSD supports it and the OS recognizes it. You can check with fsutil behavior query DisableDeleteNotify on Windows.

How to Choose the Right Method

Consider why you need to delete the file:

  • Everyday deletion: Empty the Recycle Bin or Trash. Good enough for personal files.
  • Selling or giving away a computer: Use a secure erase tool that overwrites the entire drive (e.g., Darik’s Boot and Nuke for HDDs, or the manufacturer’s secure erase for SSDs).
  • Compliance with data protection regulations (e.g., HIPAA, GDPR): Use a tool that meets the standard (e.g., DoD 5220.22-M, NIST 800-88). For SSDs, use ATA Secure Erase or physical destruction.
  • Deleting a single sensitive file: Use a file shredder tool that overwrites the file’s data before deletion.

Frequently Asked Questions

Does emptying the Recycle Bin permanently delete files?

No, not in the physical sense. It removes the file’s reference, but the data remains on the disk until overwritten. Recovery software can often restore it.

Can I recover a file after emptying the Recycle Bin?

Yes, if the data hasn’t been overwritten. Use recovery software like Recuva, PhotoRec, or Disk Drill. The sooner you stop using the drive, the better the chance.

Is one pass of overwriting enough?

For modern HDDs, one pass with zeros is generally considered sufficient. For SSDs, overwriting is not reliable; use secure erase instead. Multiple passes are rarely needed.

Does formatting a hard drive delete everything?

A quick format does not erase data; it only creates a new file system. A full format on an HDD may overwrite, but on an SSD it may not. For secure deletion, use a dedicated tool.

How do I delete files securely on a USB flash drive?

USB flash drives are similar to SSDs in that they use NAND flash. Overwriting may not work due to wear leveling. Use a tool that supports secure erase for USB drives, or physically destroy the drive if it contains highly sensitive data.

What is the best way to erase an SSD before selling it?

Use the ATA Secure Erase command via the manufacturer’s utility (e.g., Samsung Magician, Crucial Storage Executive) or a bootable tool like Parted Magic. This resets all cells to an erased state.

Related

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