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 .

Leave a Comment

Would Europe Be Drawn into a Hypothetical U.S.-Israel-Iran Nuclear War? NATO Rules Explained

Would Europe Be Drawn into a Hypothetical U.S.-Israel-Iran Nuclear War? NATO Rules Explained

A guide to NATO Articles 4 and 5, UN self-defense rules, and why consultation does not mean automatic European entry into war.

Could Iran Already Have Nuclear Weapons? How to Read the Evidence

Could Iran Already Have Nuclear Weapons? How to Read the Evidence

Assess claims about Iran in six steps, distinguishing uranium enrichment, weapons development and verified possession.

US and Israel Nuclear Authority: What Public Sources Actually Explain

US and Israel Nuclear Authority: What Public Sources Actually Explain

Understand nuclear decision authority in six steps, including US civilian control and the limits of public information about Israel.

Strait of Hormuz in 2026: What Official Sources Say About Shipping Disruption

Strait of Hormuz in 2026: What Official Sources Say About Shipping Disruption

A guide to official 2026 evidence on Hormuz shipping disruption, Iran-related claims, confirmed incidents, and what remains uncertain.

Would a Hypothetical U.S.-Israeli Nuclear Strike on Iran Cause World War 3?

Would a Hypothetical U.S.-Israeli Nuclear Strike on Iran Cause World War 3?

A source-based guide to nuclear escalation risks, UN Charter rules and NATO Article 5 in a strictly hypothetical Iran scenario.

How to Prepare for a Hypothetical EMP-Related Power Outage: 5 Civilian Steps

How to Prepare for a Hypothetical EMP-Related Power Outage: 5 Civilian Steps

Use five steps to prepare for an outage; nuclear and EMP scenarios are hypothetical, and official shelter instructions come first.

How to Assess Cyber Disruptions Without Assuming WW3: A 5-Step Guide

How to Assess Cyber Disruptions Without Assuming WW3: A 5-Step Guide

Use 5 defensive steps to verify a cyber disruption, protect household accounts, and avoid mistaking an outage for war.

Nuclear Winter: How to Assess the Global Climate Effects of a Hypothetical Iran Strike

Use these 5 steps to assess climate effects from a hypothetical Iran strike, compare model assumptions, and avoid unsupported predictions.

How Long Could Earth Take to Recover After a Hypothetical Nuclear War?

How Long Could Earth Take to Recover After a Hypothetical Nuclear War?

Explore six steps for reading research on climate, food and ecosystem recovery after a hypothetical nuclear conflict.

Nuclear Fallout Preparedness Checklist: Essential Supplies and Shelter Steps

Nuclear Fallout Preparedness Checklist: Essential Supplies and Shelter Steps

Build a practical fallout preparedness kit in six steps, with sealed food and water, a radio, medical supplies and shelter guidance.