Clean Disk with DiskPart Command

April 13, 2016

This article will show you how to use DiskPart clean or clean all command to clean a disk in Windows 10/8/7. But if you want to find a simpler way, AOMEI Partition Assistant is a good helper.

Why you need to clean disk?

Sometimes, you may want to delete some important files and you do not want it back. But if you delete it directly, it may recovered by many recovery tools. While, clean disk is more powerful. It can wipe the unallocated space in the disk so that the deleted files cannot be found by any chance to be undeleted. When you clean disk, all the data on it will be erased permanently. Nobody can recover the data on it. If you want to destroy some important files, “clean” is much better than “delete”. Well, the Windows tool Diskpart is able to use the clean and clean all to clean disks or partitions for you.

How to clean disk with command line?

How to clean disk with Diskpart? Diskpart is a wonderful tool for disk management. You can use it with its specific syntax “clean” or “clean all” to erase the data permanently. To clean disk with Diskpart command line, you can refer to the following steps. Before you do, make sure that you have the correct disk.

Click Start, type “cmd”, right click the program and select “Run as Administrator” to open the command prompt. Or you can press the “WIN+R”, type “cmd” and press Enter. Then, you should input “diskpart” to launch the program.

Type list disk and press Enter. This would list all the disk of your computer. Then, you can input select disk n to select the disk which you want to clean or clean all on it. If the disk’s status is offline, you can type online disk and press Enter to make it online. Then, type “clean” or “clean all” according to your request. The clean command will clean the data on the HDD, which is only marked as deleted and written over when the new data is stored at the same place on the HDD. The clean all command will erase every byte on the disk to prevent the deleted data being able to recovered, and it will take a longer time to finish.

Here takes an example for you. Clean the disk 1 with the steps above and shown as the following screen shot.

Clean Disk

But here we highly recommend you do not use the clean or clean all command to clean an SSD because that may slow down the read or write speed of SSD.

Using AOMEI Partition Assistant to clean disk

If you want to find a simpler way to clean disk, here we highly recommend you AOMEI Partition Assistant, a good disk manager which can help you manage your disk free with the easy-to-use interface. The graphic user interface (GUI) provides you manage disk with a few mouse-clicks. To clean disk, you can use the “Wipe Disk” function.

Before you do, you have to ensure the disk which you want to clean. Because once the disk wiped, the data on the disk would not be able to be recovered.

First, download its free edition, install and launch it. Then you will see the basic situation of your disks. Select the disk which you want to clean, right click on it, select Wipe Hard Drive.

Select Wipe Hard Drive

Then, specify the number of times to wipe the hard drive.

Wipe Hard Drive

Finally, click Apply to execute the whole operations. When you click Apply, it will show you the pending operations. Confirm it, then click Proceed to submit the operations.

Click Apply

Both Diskpart and AOMEI Partition Assistant can clean disk. but the former one needs you to know more about Diskpart, because the command can not be undone once it is executed. AOMEI Partition Assistant is simpler that even a non-technician can operate it alone. What’s more, AOMEI Partition Assistant 5.8 Edition provides you partitioning command line too, and if you want to use the command to manage disk, it is OK.