How-to

How to Permanently Delete Already Deleted Files in Windows 11 and 10

Deleting a file in Windows, even emptying the Recycle Bin, doesn’t immediately erase it. Windows just marks that space as free, so recovery tools can often bring the file back until something new overwrites it. If you’re selling a PC, handing it to someone else, or just want old files truly gone, you need one…

Aman Bhatia · Updated Nov 20, 2026 · 4 min read
How to permanently delete already deleted files in Windows

How to permanently delete already deleted files in Windows

Deleting a file in Windows, even emptying the Recycle Bin, doesn’t immediately erase it. Windows just marks that space as free, so recovery tools can often bring the file back until something new overwrites it. If you’re selling a PC, handing it to someone else, or just want old files truly gone, you need one more step. The right method depends on whether your drive is a hard disk (HDD) or a solid-state drive (SSD).

Quick answer: On a hard drive, open Command Prompt as administrator and run cipher /w:C:\ to overwrite all free space on drive C, which makes already-deleted files unrecoverable. On an SSD, Windows’ TRIM feature usually clears deleted data automatically; check it with fsutil behavior query DisableDeleteNotify (a result of 0 means TRIM is on). If you’re giving the PC away, use Settings, System, Recovery, Reset this PC with the “Clean data” option instead.

How to permanently delete already deleted files in Windows: HDD use cipher /w:C: in an admin Command Prompt; SSD check TRIM with fsutil behavior query DisableDeleteNotify; selling a PC use Reset this PC with Clean data

First: is your drive an HDD or an SSD?

  1. Click Start, type Defragment and open Defragment and Optimize Drives.
  2. Look at the Media type column next to each drive: it says Hard disk drive or Solid state drive.

This matters because overwriting free space is the right tool for hard drives, but unnecessary on most SSDs.

Method 1: Wipe free space with cipher (hard drives)

Windows has a built-in command, cipher, whose /w option removes data from the unused space on a drive, according to Microsoft’s documentation. It doesn’t touch your existing files; it only overwrites the free space where deleted files used to be.

  1. Close other apps, since this can take a while and uses the drive heavily.
  2. Click Start, type cmd, right-click Command Prompt and choose Run as administrator.
  3. Type cipher /w:C:\ and press Enter. Replace C with another drive letter to clean a different drive, for example cipher /w:D:\.
  4. Wait until it finishes. Cipher makes three passes over the free space (zeros, then 0xFF, then random data), so on a large drive it can take hours.

Pointing cipher at a folder, such as cipher /w:C:\Users, still cleans the free space of the whole drive that folder is on, not just that folder.

Method 2: Check TRIM on an SSD

On SSDs, Windows sends TRIM commands that tell the drive which blocks are no longer used, and the drive clears them on its own. That usually makes deleted files much harder to recover without any extra steps, and running cipher repeatedly on an SSD just adds unnecessary wear.

  1. Open Command Prompt as administrator.
  2. Run fsutil behavior query DisableDeleteNotify, as described in Microsoft’s fsutil documentation.
  3. If the result for NTFS is DisableDeleteNotify = 0, TRIM is on (good). If it shows 1, TRIM is off.

For the strongest protection on an SSD, turn on BitLocker or Device Encryption before you store sensitive files, so anything left behind on the drive is encrypted.

Method 3: Selling or giving away your PC

If the whole PC is leaving your hands, don’t bother cleaning individual files. Reset Windows and wipe the drive:

  1. Back up anything you want to keep.
  2. Go to Settings, System, Recovery, then Reset this PC.
  3. Choose Remove everything, then open the settings option and turn on Clean data.
  4. Follow the prompts. This can take a few hours, especially on hard drives.

Deleting single files securely

If you only want to destroy one sensitive file rather than all free space, delete it normally, empty the Recycle Bin, then run cipher /w on that drive. Alternatively, Microsoft’s free Sysinternals SDelete tool can securely delete individual files from the command line.

Tips

  • Empty the Recycle Bin before running cipher, or those files won’t be in free space yet.
  • Cloud sync folders like OneDrive keep copies online; delete files there too, and empty the online recycle bin.
  • Don’t run cipher on an almost-full drive during important work, since it temporarily fills the remaining space.

If personal data has already been exposed, follow our data breach checklist. You can also protect yourself with a credit freeze, and see our guide to the best data removal services for information about you on the web.

FAQs

Can deleted files be recovered in Windows?

Often, yes. Windows marks deleted files’ space as free but doesn’t erase it, so recovery tools can bring files back until the space is overwritten. On SSDs with TRIM on, recovery is much less likely.

How do I permanently delete already deleted files?

On a hard drive, run cipher /w:C:\ in an administrator Command Prompt to overwrite free space. On an SSD, make sure TRIM is on with fsutil behavior query DisableDeleteNotify.

Is cipher /w safe?

Yes. It only overwrites free space and doesn’t delete your existing files. It can take hours on large hard drives and isn’t needed regularly on SSDs.

What’s the best way to wipe a PC before selling it?

Use Settings, System, Recovery, Reset this PC, choose Remove everything and turn on Clean data.

Updated November 20, 2026: rewritten for Windows 11 and 10, with separate steps for hard drives and SSDs.

Disclosure: TheTechHacker has no paid relationship with Microsoft or any company mentioned here.

Keep reading

More in How-to

View all →
Written byAman Bhatia
I am a tech enthusiast who loves playing and tweaking around with tech and write about it. I might also play games on my PC or go for a drive whenever I feel bored. Peace.

Comments

Leave a comment

The Thetechhacker letter

The week in tech, minus the noise.

New reviews, fixes and the stories that matter — once a week, straight to your inbox.