How to Securely Erase Data in Windows 10 Using Cipher Command

Securing data is of paramount importance in the digital age. However, when it's time to dispose of data, merely deleting files doesn't always eliminate them completely. The Cipher command in Windows 10 provides a method to securely erase data, ensuring it's irrecoverable.

Understanding Key Terms

  • Cipher: A built-in command-line tool in Windows that allows users to encrypt or decrypt files and directories on NTFS drives. Additionally, it can be used to securely overwrite free space, thus making previously deleted data unrecoverable.
  • NTFS: New Technology File System, the standard file system of Windows NT, including its later versions like Windows 10. It has several technical improvements over previous file systems.
  • Command Prompt: A command-line interpreter application available in most Windows operating systems, where users can execute commands.
  • Data Remanence: The residual representation of digital data even after attempts have been made to remove or erase it.

Why Use Cipher for Data Erasure?

While standard deletion methods remove the pointers to the data, the actual data might still reside on the disk until it's overwritten by new data. This lingering data poses a risk as it can be recovered using specialized software. Cipher, when used to overwrite free space, ensures that traces of deleted data are securely removed, mitigating this risk.

Securely Erasing Data: Step-by-step Guide

  1. Open the Start menu, type cmd, right-click on Command Prompt, and choose Run as administrator.
  2. Navigate to the directory where the data was previously deleted and where free space needs to be overwritten. For instance, to navigate to the D: drive, type the command below:

  3. To securely overwrite the free space, use the following command:

    cipher /w:D:
  4. Wait for the process to complete. The command overwrites the free space three times: once with zeros, once with 255s, and once with random numbers.
  5. Once completed, close the Command Prompt.


Security concerns extend beyond active data to also encompass data that are no longer in use. By leveraging the Cipher command in Windows 10, it's possible to achieve a higher degree of data security, ensuring deleted files remain beyond the reach of recovery efforts.


It's always advisable to back up essential data before executing any commands that modify disk contents. The steps provided are based on the features and behaviors of Windows 10 up to the time of this article (2023).