How to Erase a Disk using Diskpart Clean Command in Windows 10
You can use the clean or clean all Diskpart command options to erase (wipe) a disk leaving it unallocated and not initialized.
The clean command removes any and all partition or volume formatting from the disk with focus. On master boot record (MBR) disks, only the MBR partitioning information and hidden sector information are overwritten. On GUID partition table (GPT) disks, the GPT partitioning information, including the Protective MBR, is overwritten; there is no hidden sector information. The clean command will only mark the data on the disk as deleted, and will not zero (secure erase) the disk like the clean all command below.
The clean all command performs the same action as the clean command above, but includes to specify that each and every sector on the disk is zeroed (secure erase), which completely deletes all data contained on the disk. This will make the data on the disk unrecoverable. It will take about an hour per 320 GB to finish running the "clean all" command on a disk.
This tutorial will show you how to use the clean or clean all Diskpart commands to erase a disk in Windows 7, Windows 8, and Windows 10.
You must be signed in as an administrator to "clean" or "clean all" a disk.
Be sure you verify the correct disk number of the disk you want to erase from Disk Management (diskmgmt.msc) before doing the steps below.
You do not want to erase the wrong disk, and lose data.
EXAMPLE: Disk that is not initialized and unallocated after running "clean" or "clean all" command
Here's How:
1 Open either an elevated command prompt or a command prompt at boot for what you want to use.
You will not be able to run the clean or clean all command on the disk that Windows is installed on unless you do so in a command prompt at boot.
2 Type thediskpart
command into the command prompt, and press Enter. (see screenshots below step 5)
3 Type thelist disk
command into the command prompt, and press Enter.
4 Type the command below into the command prompt, and press Enter.
select disk #
Substitute # in the command above with the actual disk number (ex: "3") of the disk you want to clean.
For example:select disk 3
5 Type theclean
orclean all
command you want to use into the command prompt, and press Enter.
The clean command will finish quickly since it only marks the data on the disk as deleted.
The clean all command will take about an hour per 320 GB to finish running since it performs a secure erase.
6 You can now initialize the disk, convert the disk to MBR or GPT, and create a New Simple Volume on the disk. (see screenshots below)
That's it,
Shawn
Related Tutorials
- How to Format a Disk or Drive in Windows 10
- How to Delete Volume or Partition in Windows 10
- How to Extend Volume or Partition in Windows 10
- How to Shrink a Volume or Partition in Windows 10
- How to Use Cipher Command to Overwrite Deleted Data in Windows