Windows Delete File Securely / Permanently Delete File Data

Q. I know how to delete a file securely using GNU/Linux and Open source tools under Linux. I’m looking for DoD 5520.22-M or NNSA compliant delete utility under Windows. How do I delete a file permanently under Windows XP or Server operating system with NTFS; so that no one can retrieve my data?

A. Linux does offers various programs such as shred or DOD 5220.22-M certified scrub utility.


sDelete: Permanently Delete File

You need to use SDelete which, 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. Visit this page to grab sDelete (47KB).

It works on following Microsoft operating systems:

  • Client: Windows XP and higher.
  • Server: Windows Server 2003 and higher.

Once downloaded open command prompt by visiting Start -> Run -> Type cmd and press [Enter] key.

To delete all data stored in a file called c:\docs\finical.xls, enter:
sdelete -p 10 -z c:\docs\finical.xls

To delete all data and files stored in a directory (folder) called c:\docs\excel, enter:
sdelete -p 10 -z c:\docs\excel

sDelete Quick help:

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.

Eraser Open Source Free Software

Eraser is an advanced security tool (for Windows), which allows you to completely remove sensitive data from your hard drive by overwriting it several times with carefully selected patterns. Works with Windows 95, 98, ME, NT, 2000, XP, Vista, Windows 2003 Server and DOS. Eraser is Free software and its source code is released under GNU General Public License. Uses the Guttmann (Default), Pseudorandom Data and US DoD 5220-22.M methods. Download Eraser software here.

A note about wiping a hard disk

Use Darik’s Boot and Nuke (“DBAN”) is a self-contained boot disk that securely wipes the hard disks of most computers. DBAN will automatically and completely delete the contents of any hard disk that it can detect, which makes it an appropriate utility for bulk or emergency data destruction.

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

3 comments… add one
  • Spaceshippie Dec 17, 2008 @ 17:20

    I would recommend Eraser it’s open source, complies with US DoD 5220-22.M methods and it installs it self as part of the context menu in explorer.

  • 🛡️ Vivek Gite (Author and Admin) nixCraft Dec 17, 2008 @ 17:32


    Thanks for sharing eraser. The FAQ has been updated.

  • Jacki Dec 21, 2008 @ 11:56

    Good Information

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.