Home » Clean Disk using Diskpart Clean Command in Windows 10

Clean Disk using Diskpart Clean Command in Windows 10

Clean Disk using Diskpart Clean Command in Windows 10: Almost all of us have gone through SD card or external storage device not working when connected to PC because of data corruption or any other issue and even formatting the device doesn’t seem to fix the issue. Well, if you are facing a similar issue then you could always use DiskPart tool to format your device and it might start working again. For this to work there should not be any physical or hardware damage to the device and also the device must be recognized in Command Prompt even though if it’s not recognized by Windows.

Well, DiskPart is a command-line utility that comes inbuilt in Windows and it allows you to manage storage devices, partitions, and volumes by using direct input at the Command Prompt. There are many features of DiskPart like Diskpart can be used to convert a basic disk to a dynamic disk, convert dynamic disk to a basic disk, clean or delete any partitions, create partitions, etc. But in this tutorial, we are only interested in the DiskPart “Clean” command which wipes a disk leaving it unallocated and not initialized, so let’s see How to Clean Disk using Diskpart Clean Command in Windows 10.

How to Clean Disk using Diskpart Clean Command in Windows 10

When using the “Clean” command on MBR partition (Master Boot Record), it will only overwrite the MBR partitioning and hidden sector information and on the other hand when using the “Clean” command on GPT partition (GUID partition table) then it will overwrite GPT partitioning including the Protective MBR and there is no hidden sector information associated. The only drawback of the Clean command is that it only marks the data on the disk delete but will not securely erase the disk. In order to securely erase all the content from the disk, you should use “Clean all” command.

Now the “Clean all” command does the same thing as “Clean” command but it makes sure to wipe each and every sector of the disk which completely deletes all the data on the disk. Do note that when you use “Clean all” command then the data on the disk is unrecoverable. So without wasting any time let’s see How to Clean Disk using Diskpart Clean Command in Windows 10 with the help of the below-listed tutorial.

Clean Disk using Diskpart Clean Command in Windows 10

Make sure to create a restore point just in case something goes wrong.

1.Press Windows Key + X then select Command Prompt (Admin).

command prompt with admin rights

2.Connect the drive or external device which you want to clean.

3.Type the following command into cmd and hit Enter:

diskpart

diskpart

4.Now we need to get a list of all the drive available and for that type the following command and hit Enter:

list disk

select your disk listed under diskpart list disk

Note: Carefully identify the disk number of the disk you want to clean. For example, you need to see the size of the drive then decide which is the drive you want to clean. If by mistake you selected any other drive then all the data will be wiped clean, so be careful.

Another way to identify the correct disk number of the disk you want to clean is to use Disk Management, just press Windows Key + R then type diskmgmt.msc and hit Enter. Now note down the disk number of the disk which you want to clean.

diskmgmt disk management

5.Next, you need to select the disk in diskpart:

select disk #

Note: Replace # with the actual disk number which you identify in step 4.

6.Type the following command to clean the disk and press Enter:

clean

OR

clean all

Clean Disk using Diskpart Clean Command in Windows 10

Note: Clean command will quickly finishing formatting your drive while “Clean all” command will take about an hour per 320 GB to finish running since it performs a secure erase.

7.Now we need to create a partition but before that ensure that the disk is still selected using the following command:

list disk

Type list disk & if the drive still selected, you will notice an asterisk next to the disk

Note: If the drive still selected, You will notice an asterisk (*) next to the disk.

8.To create a primary partition you need to use the following command:

create partition primary

To create a primary partition you need to use the following command create partition primary

9.Type the following command into cmd and hit Enter:

select partition 1

Type the following command into cmd and hit Enter select partition 1

10.You need to set the partition as active:

active

You need to set the partition as active, simply type active and hit Enter

11.Now you need to format the partition as NTFS and set a label:

format FS=NTFS label=any_name quick

Now you need to format the partition as NTFS and set a label

Note: Replace any_name with anything you want to name your drive.

12.Type the following command to assign a drive letter and press Enter:

assign letter=G

Type the following command to assign a drive letter assign letter=G

Note: Make sure the letter G or any other letter you choose isn’t in use by any other drive.

13.Finally, type exit to close DiskPart and command prompt.

Recommended:

That’s it you have successfully learned How to Clean Disk using Diskpart Clean Command in Windows 10 but if you still have any questions regarding this tutorial then feel free to ask them in the comment’s section.

nv-author-image

Aditya Farrad

Aditya is a self-motivated information technology professional and has been a technology writer for the last 7 years. He covers Internet services, mobile, Windows, software, and How-to guides.

Leave a Reply

Your email address will not be published. Required fields are marked *