How to Completely Delete Any Windows File Using SDelete

Files deleted from your PC may still be recoverable, at least for a short time. To make sure they're gone forever, you can use SDelete. This command-line utility securely erases data, making it unrecoverable.

Table of Contents

What is SDelete?

When you delete a file, your computer simply marks the space it occupied as unallocated. This means that until another application overwrites the space, the contents can be recovered using data recovery tools .

SDelete can ensure that deleted files cannot be recovered. This command-line utility not only deletes existing files, but also removes previously deleted data that remains in unallocated areas of the drive. It securely erases data using the DOD 5220.22-M strong data deletion standard, recommended by the U.S. Department of Defense. It works by overwriting file data on disk clusters.

How to install SDelete

To get started, visit the Microsoft Sysinternal site . Click Download SDelete to save the compressed file to your local drive. Right-click the downloaded file, select Extract All , select a destination folder, and then click Extract .

How to Completely Delete Any Windows File Using SDelete
SDelete Download Page

Since SDelete is a command-line utility, it does not work like a regular application with a graphical interface. To set it up, first move the unzipped SDelete folder to the C:\Program Files folder . Once done, follow these steps:

1. Click Start , type view advanced system settings and open the best match.

How to Completely Delete Any Windows File Using SDelete

2. Select Environment Variables .

How to Completely Delete Any Windows File Using SDelete

3. In System variables , select the Path line and choose Edit .

4. Select New to add a new line, then click Browse . Navigate to C:\Program Files and select the SDelete folder .

How to Completely Delete Any Windows File Using SDelete

5. Click OK on all open dialog boxes.

After configuring SDelete, launch the tool and see how it works.

1. Click Start , type cmd , right-click Command Prompt and select Run as Administrator .

How to Completely Delete Any Windows File Using SDelete

2. Type SDelete and press Enter in the Command Prompt window to launch the tool. You will also see the SDelete License Agreement dialog box when the tool is run for the first time. Click Agree to close the dialog box.

How to Completely Delete Any Windows File Using SDelete
SDelete Command in Command Prompt

How to use SDelete to delete files permanently

Before you begin, you should back up your data. Also, consider testing SDelete on a virtual machine first to minimize the risk of accidentally deleting important files. If you don't already have a virtual machine , you can easily set one up on a Windows PC for testing.

To get started, launch Command Prompt with admin privileges . In Command Prompt , type SDelete and press Enter to launch the tool. This will display a list of parameters and arguments that you can use with the SDelete command to securely delete files and free up disk space .

For this tutorial, we will be securely deleting the MP3 file located in the C:\Media folder . Open File Explorer , locate and right-click the MP3 file , then select Copy as Path to copy the full file path of that file.

How to Completely Delete Any Windows File Using SDelete

Next, in the Command Prompt, type SDelete followed by the file path. For example, the full command would look like this:

SDelete C:\Media\OneMP3.mp3
How to Completely Delete Any Windows File Using SDelete
SDelete Command in Command Prompt

Press Enter to execute the command. If successful, you will see the output:

Files deleted: 1

Next, try deleting the Media folder located in C:\ .

When deleting a directory, you need to include its subdirectories and handle any read-only attributes to ensure everything is cleaned up properly. To do this, use the SDelete command with the -s parameter to include subdirectories and -r to remove read-only attributes.

The full command would look like this:

SDelete -s -r C:\Media

After running the command, the output will show the number of folders and files that have been deleted.

How to Completely Delete Any Windows File Using SDelete
SDelete Command in Command Prompt

Other uses for SDelete

In addition to securely deleting files, SDelete offers a number of other features for managing your data. Here are some additional ways you can use SDelete.

Unallocated space management

The -c parameter allows you to clean up unallocated space previously used by deleted data without affecting your existing files. To use it, type SDelete followed by the -c parameter and the drive letter. For example, to clean up free space on drive F:, run:

SDelete -c F:

Specify number of overwrites

By default, SDelete overwrites unallocated space once to make recovery more difficult. To make data recovery even more difficult, you can use the -p parameter followed by a number to specify multiple overwrites. For example, use the following command to overwrite the target 3 times, etc.:

SDelete -s -r -p 3 C:\Media

SDelete goes beyond the standard deletion action offered by Windows and other operating systems. Clearing up your disk space with SDelete ensures that no one can retrieve any of your data when you trade in or give away your computer. Even then, throwing away old technology is risky. Here's what you need to do before selling your laptop or phone .

Sign up and earn $1000 a day ⋙

Leave a Comment

Apple may be preparing to integrate Gemini into Apple Intelligence

Apple may be preparing to integrate Gemini into Apple Intelligence

Code found in the newly released iOS 18.4 beta suggests Apple is preparing an alternative to the ChatGPT integration in Apple Intelligence, most likely Google Gemini.

How to create a blurred border in Photoshop

How to create a blurred border in Photoshop

Vignette is a classic and timeless effect that darkens the edges of a photo to focus and draw attention to the subject.

Latest Black Goddess Code and how to redeem code

Latest Black Goddess Code and how to redeem code

If you want to receive diamonds, SSR generals, lottery tickets along with many other items, then use the code Black Goddess and redeem the rewards.

Tips for playing Doggo Go through level 2, how to play Doggo Go level 2

Tips for playing Doggo Go through level 2, how to play Doggo Go level 2

Currently Doggo Go is a Mobile Game that only 1% of players in the world can pass level 2.

Apple Watch Ultra 3 could be the first smartwatch to feature satellite connectivity

Apple Watch Ultra 3 could be the first smartwatch to feature satellite connectivity

The Apple Watch Ultra 3 is rumored to feature a unique new communication tool. Bloomberg's Mark Gurman has just revealed some exciting new details about the upcoming smartwatch.

Top Trending Searches in 2024

Top Trending Searches in 2024

To see what the world is curious about this year, check out Google's Year in Search, which just launched on December 11, 2024.

Samsung is bringing a great video-recording feature from Pixel phones to the Galaxy

Samsung is bringing a great video-recording feature from Pixel phones to the Galaxy

The quality of video captured through smartphone cameras in general has improved dramatically over the past few years.

How to treat blisters on feet when walking a lot and wearing tight shoes

How to treat blisters on feet when walking a lot and wearing tight shoes

What to do if your feet get blisters from wearing shoes? This article will guide you on how to fix blisters from wearing shoes.

Multiple choice on general science knowledge

Multiple choice on general science knowledge

Multiple choice questions about life sciences will help you consolidate and expand your knowledge about the world. Let's answer the general knowledge questions below!

How to protect TV, refrigerator, washing machine from mold in wet season

How to protect TV, refrigerator, washing machine from mold in wet season

During the humid season, electronic and refrigeration equipment often malfunction or break down due to high humidity in the air. If you know how to handle humidity in your home, your equipment will avoid the above situations.

Comparing condenser dryers, vented dryers and heat pump dryers, what are the differences, which one should I buy?

Comparing condenser dryers, vented dryers and heat pump dryers, what are the differences, which one should I buy?

There are three common types of dryers on the market today: condenser dryers, vented dryers, and heat pump dryers. To find out which dryer is right for your home, please read our article!

How to Add Recycle Bin to File Explorer

How to Add Recycle Bin to File Explorer

This guide will show you all the steps needed to show the Recycle Bin in File Explorer, regardless of whether you are using Windows 10 or Windows 11.

What to Know About Peaklight: New Stealth Malware Targets Illegal Movie Downloads

What to Know About Peaklight: New Stealth Malware Targets Illegal Movie Downloads

Now, a new attack called Peaklight is going viral and targeting people who download movies illegally.

Bluetooth 6.0 brings new technology that helps Apple improve Find My network

Bluetooth 6.0 brings new technology that helps Apple improve Find My network

The Bluetooth Special Interest Group (Bluetooth SIG) released the specifications for the next generation of the technology, called Bluetooth 6.0, this week.

How to use abstract images to create phone wallpapers

How to use abstract images to create phone wallpapers

You can create your own phone wallpapers from abstract photos. Not only are they beautiful, but the process of creating them is quite fun.