Ask Dave Taylor
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube
  • Home
  • YouTube Videos
  • Top Categories
  • Subscribe via Email
  • Ask A Question
  • Meet Dave
  • Home
  • Windows PC Help
  • Secure Delete Files and Data from a Windows 11 System?

Secure Delete Files and Data from a Windows 11 System?

January 10, 2023 / Dave Taylor / Windows PC Help / 2 Comments

I want to give my computer to my cousin since I got a new laptop from work, but want to ensure he can’t recover any of my deleted content. Does Windows have a secure delete feature, and if so, how can I use it?

There’s a world of difference between what appears to happen when you “empty recycle bin” and what actually occurs on your Windows PC. Indeed, “empty” is a bit of a misnomer because what it essentially does is just mark those sectors of your hard disk – or SSD – available, without actually “deleting” anything. To understand, we need to talk just a bit about how disks and file systems work…

Shortcuts: Empty Recycle Bin? | Install SDelete | Using SDelete

Your storage is broken up into thousands or even millions of “blocks”, typically 1024 bytes in size, and those are chained together to create large storage spaces. All of it’s tracked through the file system, which essentially has a catalog of every block on the drive, marked as “in use” or “available”. After a while, this is where fragmentation can occur too: Your last saved photo might have its data spread across blocks 1, 6, 22, 105, and 25,303, for example. Not to worry, systems are designed for this usage nowadays. The catalog of files and utilized storage blocks is known as the file allocation table (FAT) and having that get corrupted is fairly catastrophic, as you can imagine.

But when you empty the trash or recycle bin, what the system is basically doing is zipping through all of the blocks allocated for each and every file, changing each from “in use” to “available”. Eventually, they’ll be overwritten with the data from the new file, once allocated, but until they’re allocated, the old bits remain untouched, ready to be recovered or salvaged by an undelete utility or curious cousin.

No surprise, there are a lot of secure delete programs and utilities you can buy to address this problem: A search in the Microsoft Store reveals dozens of possible options, ranging from free to free with in-app purchases to a few dollars on up. But it turns out that Microsoft has its own secure delete utility you can download and use for free. The catch? It’s a command line tool so you’ll have to be comfortable using Command Prompt. Let’s have a look!

THE STATE OF DELETE ON WINDOWS 11

Right-click on your Recycle Bin and you’ll get a menu of options:

win11 secure delete trash recycle bin - default menu

Choose “Empty Recycle Bin” and it’ll appear to do just that, but you now know that it’s not deleting anything, just marking the utilized space as available for other files.

Even “Show more options” doesn’t offer anything more sophisticated:

win11 secure delete trash recycle bin - empty recycle bin more options

Even if you choose the “Remove files immediately when deleted” it still won’t be a secure delete that ensures nothing can be recovered. So what’s to do?

DOWNLOAD AND INSTALL SDELETE

The solution is to grab yourself a copy of the sdelete program from Microsoft. It’s part of a suite of tools known as “Sysinternals” and has very little handholding and no help screens. In fact, there are no windows at all since it’s a command line tool.

Grab a copy from learn.microsoft.com/en-us/sysinternals/downloads/sdelete where you’ll see this:

windows 11 secure delete sdelete - download

Notice how tiny it is: 518 Kb is probably the smallest download you’ll have all week.

One thing that’s really critical to understand, even given its name, is that SDelete doesn’t empty the recycle bin before working. In other words, what it really does is securely overwrite those data blocks on the file system that have information but are marked as “available”. This means that if you’re only using 7% of your disk, it’s going to run quite a bit more slowly than if you have 89% filled up with your data and files. It also means that the first step in using the program is to have Windows 11 “Empty Recycle Bin” before you start.

Download SDelete and double-click the download to open it up. You’ll be prompted to extract the program into a folder, asking for a target directory:

windows 11 secure delete sdelete - extract files where?

As shown, choose “C:\Windows\System32” for this utility. Once you’ve found that, click on “Extract“.

windows 11 secure delete sdelete - permission to extract

No worries, click on “Continue” for the three files it installs (a 32-bit and 64-bit version of the program). Done.

RUNNING SDELETE TO OVERWRITE FREE DISK BLOCKS

Now that it’s installed, you can quit the installer. Empty your Recycle Bin as per normal.

To run SDelete, remember that you need to use the Command Prompt, so use the handy Win11 toolbar search to search for “cmd”:

windows 11 secure delete sdelete - search 'cmd'

As highlighted, it’s critical that you run the program as administrator since it requires special permissions. Don’t have administrative permission on your PC? Try logging in as admin to fix that. Still can’t run as administrator? Then you might not be able to use SDelete (but you probably weren’t able to install it either).

The Command Prompt is old school MS-DOS/CPM style interaction, a fun retro experience that every Linux user will undoubtedly enjoy too. At this juncture you can simply type “sdelete” to learn more about the tool:

windows 11 secure delete sdelete - command prompt help info

You can see that this utility, written by Mark Russinovich, has been around since 1999! Usage is a bit complex so if you don’t want to decipher all the options, know that this is an easy way to rewrite the data in all the free blocks on your C: drive:

sdelete -p 1 -c C:

This requests a one-pass overwrite of the C: drive. In practice, expect it to take quite a while, possibly an hour or longer, depending on the size of your drive and what percentage is empty and available. It starts thusly:

windows 11 secure delete sdelete - pass 1

Notice “Cleaning free space on C:” and that the progress indicator shows it’s at 1%. After a while, it moves to the second phase of its process…

windows 11 secure delete sdelete - pass 2

This time it’s “purging MFT files” (MFT = master file table), and it’s another rather slow process.

Finally, though, it’ll finish:

windows 11 secure delete sdelete - finished

Mission accomplished, 1 pass wipe and delete, 1 drive cleaned.

Worth noting is for government work, the MILSPEC (military specification) is a three-pass, then seven-pass process. As Mark warns: “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.” The latest MILSPEC requires three passes (“-p 3”) followed by another invocation with seven more passes (“-p 7”). This might well take overnight or longer.

Nonetheless, you now know how to clean up all of those unallocated but data-filled blocks on your hard drive. This isn’t something to use on a daily or even weekly basis, but if you’re worried about someone salvaging information from a drive, SDelete is a smart tool to have in your toolbox.

Power Tip: I’ve been writing about Windows for many years and have an extensive Windows 11 help library here. Please check it out while you’re visiting. Thanks!

About the Author: Dave Taylor has been involved with the online world since the early days of the Internet. Author of over 20 technical books, he runs the popular AskDaveTaylor.com tech help site. You can also find his gadget reviews on YouTube and chat with him on Twitter as @DaveTaylor.

Let’s Stay In Touch!

Never miss a single article, review or tutorial here on AskDaveTaylor, sign up for my fun weekly newsletter!
Name: 
Your email address:*
Please enter all required fields
Correct invalid entries
No spam, ever. Promise. Powered by FeedBlitz
Please choose a color:
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!
file privacy, pc security, secure delete

2 comments on “Secure Delete Files and Data from a Windows 11 System?”

  1. Drew Dawson says:
    January 11, 2023 at 5:31 pm

    Hi,
    Thanks for what you’ve done.
    👍

    Reply
  2. Ernest N. Wilcox Jr. says:
    January 11, 2023 at 1:57 pm

    Thank you for this item. I knew that ‘deleting’ a file only marks the storage space it consumes as ‘available’ but doesn’t remove the file content from the disk. Instead, it sits there until it is overwritten by another file. sDelete offers a way to clean this ’empty’ disk space periodically, or when a computer is passed on to another user. Of course, the original user must ‘delete’ all his/her files before running sDelete when faced with such a situation, but the effect is what most of us would desirer (’empty’ space is truly empty).

    I went a step further and created a batch file to run sDelete with a cls (clear screen) command at the top, and a pause command at the end. The cls command makes things a bit less cluttered, and the pause command keeps the CMD window open until I press a (any) key:

    Start code———
    cls
    sdelete -p 1 -c C:
    pause
    End code———–

    I created the file in Notepad and named it ‘Run sDelete.bat (with the ‘Save as Type’ field set to ‘All Files (*.*)’ at the bottom of the Save as dialog. If a military-grade deletion is required, the batch file can be modified as follows:

    Start code———
    cls
    sdelete -p 3 -c C:
    sdelete -p 7 -c C:
    pause
    End code———–

    I hope this helps others,

    Ernie

    I intend to add running this batch file as a part of my semi-annual maintenance routines.

    Reply

Leave a Reply Cancel reply

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

Search

Recent Posts

  • How to Check Energy Recommendations on your Windows Laptop
  • How Do I Customize New Tab Windows in Safari for Mac?
  • Can AI-Generated ChatGPT Text Be Accurately Identified?
  • How to Perform a Microsoft Account Security Audit and Checkup
  • How Can I Customize My Linux Dock / Taskbar?

On Our YouTube Channel

How to: Replace a Switchbot Door Sensor Battery

EMEET Luna vs INNOTRIK Studio Bluetooth Speakerphones -- DEMOS & REVIEW

Categories

  • AdSense, AdWords, and PPC Help (106)
  • Amazon, eBay, and Online Shopping Help (163)
  • Android Help (226)
  • Apple iPad Help (147)
  • Apple Watch Help (53)
  • Articles, Tutorials, and Reviews (346)
  • Auto Tech Help (15)
  • Business Advice (200)
  • ChromeOS Help (31)
  • Computer & Internet Basics (778)
  • d) None of the Above (166)
  • Facebook Help (383)
  • Google, Chrome & Gmail Help (188)
  • HTML & Web Page Design (247)
  • Instagram Help (49)
  • iPhone & iOS Help (623)
  • iPod & MP3 Player Help (173)
  • Kindle & Nook Help (99)
  • LinkedIn Help (88)
  • Linux Help (173)
  • Linux Shell Script Programming (89)
  • Mac & MacOS Help (911)
  • Most Popular (16)
  • Outlook & Office 365 Help (33)
  • PayPal Help (68)
  • Pinterest Help (54)
  • Reddit Help (19)
  • SEO & Marketing (82)
  • Spam, Scams & Security (95)
  • Trade Show News & Updates (23)
  • Twitter Help (220)
  • Video Game Tips (66)
  • Web Site Traffic Tips (62)
  • Windows PC Help (947)
  • Wordpress Help (206)
  • Writing and Publishing (72)
  • YouTube Help (47)
  • YouTube Video Reviews (159)
  • Zoom, Skype & Video Chat Help (62)

Archives

Social Connections:

Ask Dave Taylor


Follow Me on Pinterest
Follow me on Twitter
Follow me on LinkedIn
Follow me on Instagram


AskDaveTaylor on Facebook



microsoft insider mvp


This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to our terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. Our lawyer says "Thanks for your cooperation."
© 2023 by Dave Taylor. "Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.
Privacy Policy - Terms and Conditions - Accessibility Policy