Permanently delete files and clean up your storage with Sysinternals: SDelete for Windows

0

You may think that deleting a file from the Recycle Bin is enough. You can even go further and Gap + Delete each file you no longer need. What if we told you that these two methods never completely get rid of a file? At least not in the short term.


If we have piqued your interest, allow us to introduce Sysinternals: SDelete. This is a Department of Defense compliant secure removal tool provided by Microsoft and used worldwide by industry professionals.


What is Sysinternals:SDelete?

Although we advertised SDelete as a “secure removal tool”, what exactly does that mean? In short, all modern Windows NT/2K operating systems; including Windows 10 and Windows 11, implement so-called “object reuse protection”.

This protection means that when an application allocates file space or virtual memory, it cannot view data previously stored in the resources Windows NT/2K allocates to it. Windows fills the memory to zero and makes it unavailable. Unfortunately, the same does not apply to deleted files; the space they occupy is not reset, even after deletion.

All of this means that unless Windows has overwritten the space previously occupied by a deleted file; which could happen weeks or even months after the fact, the file remains recoverable. There are even dedicated data recovery tools to help you out. See how to use best third party data recovery tools for windows, for more information. However, SDelete guarantees that even with the best recovery tools available, deleted files cannot be recovered.

How to back up your data before using Sysinternals: SDelete

Since we are dealing with a tool that makes deleted files completely unrecoverable, it would be a good idea to backup your files before using SDelete. Even if you plan to delete a handful of files, be aware that if not used correctly, SDelete can render your Windows PC unusable.

Indeed, in addition to simply deleting files, SDelete can also be used to clean up file data in unallocated parts of your drive. Although this shouldn’t be a problem, it’s still possible that you’ll perform a delete operation on files that you would otherwise want to keep. Before trying SDelete, consider reviewing third-party tools, you should try to backup your Windows data.

How to use Sysinternals: SDelete

To get started, visit Microsoft Sysinternals: Delete download page and download the ZIP file.

Delete download page

Once downloaded, right click on the file and select Extract All. Next, set up a destination folder of your choice and click on the Extract button.

Extract SDelete

At this point, you might be tempted to double click one of the three EXE files located in the folder. However, that won’t work, because SDelete is a command line tool and as such requires a bit more configuration to set up properly.

  1. Start by cutting or copying the entire SDelete folder you extracted to the following folder path: C:Program Files.
  2. Then right click on This PC in File Explorer and choose Properties.
  3. In the Related links section, click Advanced System Settings.
    Advanced System Settings
  4. In the System properties dialog box, select Environment variables.
    Environment variables
  5. Click on Path below system variables, then click Edit
  6. In the new window, click Newthen Browse and locate the folder you configured in Step 1. The full path to the folder should be: C:Program FilesSDelete
    Delete system variable
  7. Click on OKAY three times to save your changes.

Now that SDelete has been properly configured, you can start using it in the command prompt.

  1. To start, press the the Windows key and type “ordered” in the Search bar. Command Prompt should be listed under Best match. Right click in the command prompt, then select Execute as administrator.
  2. Once the command prompt opens, type “to delete” and hit Walk in.
  3. You will now see a list of the different operations you can perform with SDelete, along with a Use example, to help you with the syntax.
    Remove Command Prompt

How to securely delete files with Sysinternals: SDelete

Let’s start by deleting a single file. In this case, we have a registry backup file located on the desktop.

  1. First, right click on the file and select Copy as path.
  2. Then in the command prompt, type “to delete” followed by a space, then paste the path you copied. Don’t forget to remove the quotes from both ends of the path.
  3. The entire line should look like this: “delete C:UsersPhillipDesktopBackup.reg
  4. Press Enter to execute the operation.
  5. When complete, the output will show: Deleted files: 1
    Deleting a single file

Next, let’s delete a folder, including any subdirectories it may have. In this case, we have a folder named “Screenshots” in Pictures on the C: drive.

  1. Again, right-click on the folder and select Copy as path.
  2. Then in the command prompt, type “to delete” followed by a space, then add the “-s” parameter to include subdirectories, and the “-r” parameter to remove all read-only attributes.
  3. Finally, paste the path you copied and remove the quotes at each end.
  4. The entire line should look like this: “sdelete -s -r C:UsersPhillipPicturesScreenshots
  5. Press Enter to execute the operation.
  6. When complete, the output will show the number of files and directories deleted.
    SDeleting folders

Finally, let’s use SDelete to clean up unused disk space. It should be noted that depending on the size of your disk and the amount of unused space available, this operation can take a very long time, in some cases hours.

  1. In the command prompt, type “to delete” followed by a space, then add the “-vs” to clean up free space, then append the drive letter with a colon. In this example, “vs :” conduct.
  2. The entire line should look like this: “sdelete -cc:
  3. Press Enter to execute the operation.
  4. When running, the output will show a percentage progress indicator and a message that it is “Cleaning up free space on “.

Leave No Trace with Sysinternals: SDelete

There’s no doubt that this unassuming little tool does the job remarkably well. Some might argue that encrypting your files is the much better option in the long run, because at least down the line, you can still access them.

However, if you’re particularly paranoid about your sensitive files falling into the hands of someone other than yourself, then Sysinternals: SDelete and its nuclear approach is definitely the way to go.

Share.

About Author

Comments are closed.