How to Erase Windows 10 Drive with DiskPart

DiskPart allows storing and executing commands via text script files. The DiskPart structure contains many key variables. Users can list all current drives on the system with a single command and delete any drive. 

How to Erase Windows 10 Drive with DiskPart

Step 1: Click the Start icon, select Cortana, enter cmd in the Search box.

Select Command Prompt from the list of results.

Step 2: If the UAC (User Account Control) window appears, select Yes to continue.

Step 3: In the Command Prompt window, enter the command: Diskpart .

How to Erase Windows 10 Drive with DiskPart Picture 1

Step 4: Enter the command below after the DiskPart prompt. The UAC window will reappear, select Yes .

list disk

How to Erase Windows 10 Drive with DiskPart Picture 2

After the command executes, the screen will display a list of drives on the device.

Note:  The drive number whose data you want to delete.

Step 5: Enter the following command: select disk X

Note: Replace X with the number of the drive you want to erase.

How to Erase Windows 10 Drive with DiskPart Picture 3

Step 6: Enter the following command to clear the drive data: Clean

Note: The Clean command will erase all data on the selected drive, so you need to back up your data first.

How to Erase Windows 10 Drive with DiskPart Picture 4

The above command will erase the available data on the drive.

However, deleted information can be recovered using third-party data recovery software. The clean up command does not completely erase the drive. However, there is a special command that allows you to securely erase a Windows 10 drive with DiskPart, which 'cleans up' sensitive data and prevents recovery software from retrieving the information.

Step 7: Perform steps 1 through 5.

Step 8: Enter the command clean all and press Enter to delete all data.

Note: The Clean or Clean All command may cause data loss if drives C, D, E are on the same hard drive. Consider before using or skip this command and format later.


How to Erase Windows 10 Drive with DiskPart Picture 5

This command will completely erase the drive data and cannot be recovered.

To clear hard drive data, you can use software like  CCleaner , which helps clean up your computer, delete data, memory and cache on your hard drive as well as web browsers.

Erasing a Windows 10 drive with DiskPart is an easy solution to delete unimportant data. However, DiskPart is not the best choice to protect important data from recovery and ensure secure data deletion.

5 ★ | 1 Vote

May be interested

  • How to fix unformatted hard drive?How to fix unformatted hard drive?
    when you want to erase all data on the drive to reinstall windows or save new data, we often use the format drive command. but you have tried many ways but still cannot format the hard drive. what is the reason? how to handle it?
  • How to format the hard drive on Windows 11How to format the hard drive on Windows 11
    sometimes, work requirements or a specific use situation force you to 'clean' all the data stored in the hard drive on your windows 11 pc.
  • How to Erase and Format External Hard Drive on iPhone/iPadHow to Erase and Format External Hard Drive on iPhone/iPad
    formatting external hard drives has never been possible on iphone or ipad. however, that changed with ios 18 and ipados 18, which introduced the ability to erase and format external hard drives on iphone/ipad.
  • How to Format WindowsHow to Format Windows
    this wikihow teaches you how to format any hard drive connected to your windows 10 pc. if you just want to format one drive connected to the pc, you can do so using the disk management tool. if you want to completely erase all data,...
  • How to Format a Hard DiskHow to Format a Hard Disk
    formatting a hard drive allows you to use it on your computer to store files and install programs on. the format you choose for the drive determines the drive's compatibility. formatting a drive will erase all of the data currently on the...
  • How to convert a GPT hard drive format to an MBR while installing Win with the CMD commandHow to convert a GPT hard drive format to an MBR while installing Win with the CMD command
    how to convert a gpt hard drive format to an mbr while installing win with the cmd command. normally, if we prepare to install windows fully and fully, we will perform the step of converting the hard drive format from our computer through cmd diskpart.
  • How to Format a Hard DriveHow to Format a Hard Drive
    this wikihow teaches you how to format your computer's built-in hard drive. you cannot format the whole hard drive—doing so would erase your operating system—but you can format a portion of the hard drive after creating a partition. you can...
  • How to Connect an External Hard Drive to a Macbook ProHow to Connect an External Hard Drive to a Macbook Pro
    usually, to connect an external hard drive to your computer, you just plug it in and that's it. however, with a macbook pro or any other mac, the hard drive must be formatted according to a file system supported by the mac. this process will erase all data on the hard drive. if like most hard drives on the market, your hard drive has been formatted with ntfs format, then with mac os x, you can only read but cannot write data on this hard drive.
  • How to Completely Erase a Hard Drive on WindowsHow to Completely Erase a Hard Drive on Windows
    completely erasing data on a computer is necessary, especially before selling the device or permanently deleting sensitive data that you no longer want to store. how to delete data that cannot be recovered? please refer to this article.
  • How to use Dev Drive for developers on Windows 11How to use Dev Drive for developers on Windows 11
    microsoft wants windows 11 to be every programmer's dream operating system, and dev drive is part of that plan. here's how to use dev drive on windows 11.