How do I securely delete (i.e., permanently delete) a file and/or folder in Windows? Secure in terms that the deleted file/folder can not be restored.

Can you recommend any free or open source tool?

  • None of these tools will wipe data from a drive that contains spare blocks. Especially problematic now that SSDs are common, since not only do all SSDs have spare blocks (see "overprovisioning"), but they actively use them during wear leveling. Writing on top of a file will be writing to a different block entirely that the one that held the old content.
    – Ben Voigt
    Mar 1, 2015 at 20:02

3 Answers 3


For a nice GUI tool, there is File Shredder.

With File Shredder you can remove files from your hard drive without fear they could be recovered. There are quite a few software tools today for retrieval of deleted files under Windows OS. Those tools, often referred to as "file recovery" software, are taking advantage of shortcoming of WIndows "delete" command that we all use regularly to delete files. Actually, the "delete" operation in Windows only removes bits of information from files so they appear deleted in OS. It is easy to retrieve those files using aforementioned specialized file recovery software.

In order to remove, or shred files permanently from your system you have to use a program that is capable of rewriting the files with random series of binary data multiple times. This process is often called shredding. That way, the actual content of the file has been overwritten and the possibilities to recover such a shredded file are mostly theoretical.

For a CLI approach, Sysinternals SDelete is excellent.

The only way to ensure that deleted files, as well as files that you encrypt with EFS, are safe from recovery is to use a secure delete application. Secure delete applications overwrite a deleted file's on-disk data using techiques that are shown to make disk data unrecoverable, even using recovery technology that can read patterns in magnetic media that reveal weakly deleted files. SDelete (Secure Delete) is such an application. You can use SDelete both to securely delete existing files, as well as to securely erase any file data that exists in the unallocated portions of a disk (including files that you have already deleted or encrypted). SDelete implements the Department of Defense clearing and sanitizing standard DOD 5220.22-M, to give you confidence that once deleted with SDelete, your file data is gone forever. Note that SDelete securely deletes file data, but not file names located in free disk space.

Usage: sdelete [-p passes] [-s] [-q] 
sdelete [-p passes] [-z|-c] [drive letter]
-c  Zero free space (good for virtual disk optimization).
-p passes   Specifies number of overwrite passes.
-s  Recurse subdirectories.
-q  Don't print errors (quiet).
-z  Cleanse free space.

Both tools are freeware.


I recommend Ccleaner which allows secure deletion (overwriting with up to 35 passes). this feature can be enabled via Options > Settings > Secure Deletion.

Ccleaner can also wipe free space, overwriting all free blocks and thus making it impossible to recover any files you have deleted.

In relation to Wipe free space feature

I haven't used this feature but when you delete something from your computer, let's say a picture, what's erased is the address or direction of the file, the picture is still in you computer but the location in the hard drive is open to receive (write) new information on it, when your system writes something in that location is when the picture is really deleted. This feature will wipe the data that is still kept on that space that you think is 'free'. This is how data recovery programs can get back your data.

  • Neither option is useful if you only want to delete a single file or directory. The setting only affects the files that CCleaner deletes through its normal use and the free-space option deletes all free space which can be horrible if there is a lot of free space.
    – Synetech
    Feb 6, 2013 at 1:50
  • Gutmann never meant for his 35 pass method to be used on modern OS's. It's overkill. See the entry in Wikipedia about this, where he himself said so. A few random writes are enough.
    – Jon
    Dec 13, 2015 at 19:15

I am always using Eraser, it has nice Interface and easy to use it, also, supports various algorithm for erasing:

enter image description here

  • Except for the new version crashing all the time, Eraser is okay, yeah.
    – Jon
    Dec 13, 2015 at 19:16

Not the answer you're looking for? Browse other questions tagged .