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

How to regain access to hard drive, fix error of not being able to open hard drive

How to regain access to hard drive, fix error of not being able to open hard drive

In this article, we will guide you how to regain access to your hard drive when it fails. Let's follow along!

How to use dental floss

How to use dental floss

Dental floss is a common tool for cleaning teeth, however, not everyone knows how to use it properly. Below are instructions on how to use dental floss to clean teeth effectively.

How to gain muscle according to experts

How to gain muscle according to experts

Building muscle takes time and the right training, but its something anyone can do. Heres how to build muscle, according to experts.

The Best Diets for Heart Health

The Best Diets for Heart Health

In addition to regular exercise and not smoking, diet is one of the best ways to protect your heart. Here are the best diets for heart health.

How to cure insomnia for pregnant women in the last 3 months

How to cure insomnia for pregnant women in the last 3 months

The third trimester is often the most difficult time to sleep during pregnancy. Here are some ways to treat insomnia in the third trimester.

Scientifically Proven Ways to Automatically Burn Calories

Scientifically Proven Ways to Automatically Burn Calories

There are many ways to lose weight without changing anything in your diet. Here are some scientifically proven automatic weight loss or calorie-burning methods that anyone can use.

All about iOS 26

All about iOS 26

Apple has introduced iOS 26 – a major update with a brand new frosted glass design, smarter experiences, and improvements to familiar apps.

Yoga exercises to treat insomnia

Yoga exercises to treat insomnia

Yoga can provide many health benefits, including better sleep. Because yoga can be relaxing and restorative, its a great way to beat insomnia after a busy day.

What is the flower of the other shore? Meaning and legend of the flower of the other shore

What is the flower of the other shore? Meaning and legend of the flower of the other shore

The flower of the other shore is a unique flower, carrying many unique meanings. So what is the flower of the other shore, is the flower of the other shore real, what is the meaning and legend of the flower of the other shore?

Healthy snacks that help you lose weight

Healthy snacks that help you lose weight

Craving for snacks but afraid of gaining weight? Dont worry, lets explore together many types of weight loss snacks that are high in fiber, low in calories without making you try to starve yourself.

What to do when you have trouble sleeping?

What to do when you have trouble sleeping?

Prioritizing a consistent sleep schedule and evening routine can help improve the quality of your sleep. Heres what you need to know to stop tossing and turning at night.

How to add a printer to Windows 10

How to add a printer to Windows 10

Adding a printer to Windows 10 is simple, although the process for wired devices will be different than for wireless devices.

The most commonly deficient nutrients in the diet

The most commonly deficient nutrients in the diet

Diet is important to our health. Yet most of our meals are lacking in these six important nutrients.

How to get beautiful nails quickly

How to get beautiful nails quickly

You want to have a beautiful, shiny, healthy nail quickly. The simple tips for beautiful nails below will be useful for you.

The best laptops for students in 2025

The best laptops for students in 2025

Students need a specific type of laptop for their studies. It should not only be powerful enough to perform well in their chosen major, but also compact and light enough to carry around all day.