By Emily / Last Updated May 14, 2020

“How do I clean my hard drive Windows 10?”

“I have a Dell computer running Windows 10 Pro. The computer’s second hard drive contains sensitive material which I need to completely and permanently erase so that even if the hard drive will be sold or donated someday, nobody can recover and see it. I have been researching different methods online but it is a minefield, can anyone help? How to clean a hard drive Windows 10?”

How to clean a hard drive using CMD?

Erasing hard drive clean can help restore its full capacity, or restore it to a factory fresh state with nothing stored inside. This might be something you want to do when you need to free up space on hard drive, or prevent personal data leakage after selling, donating or throwing away it. But how to wipe a hard drive in Windows 10/8/7? Next is about how to use Command Prompt to clean a selected disk.

First of all, open Command Prompt: click Start button, input “cmd” in the Search box and press Enter, right click the Command Prompt icon and select Run as administrator.

Second, in the elevated Command Prompt window, type “diskpart” to enter diskpart window.

Finally, in the Diskpart window, run the following commands in order to wipe a hard drive clean in Windows 10/8/7.

list disk: list all disks on your computer.

select disk 1,2,3…: select the disk you want to wipe completely. Here we select disk 2.

clean all: delete all data from the selected disk.

Clean Hard Drive CMD

Besides running clean command, you can also execute a special format command to write zero to hard drive, which can prevent most hardware based and all software based recovery methods from lifting information from the drive.

“format f: /fs:NTFS /p:1” : format the f drive with the NTFS file system and write zeros to every sector of the drive for a single pass.

Zero Fill Hard Drive

A GUI tool to easily clean a hard drive in Windows PC

Wiping hard drive clean via Diskpart seems like a great solution, but some users report this command line based utility is difficult to operate and easy to wipe the wrong disk, so most users scounting for a GUI hard drive eraser tool like the below one.

Looking for GUI software to write zero to HDD. I have a few hard drives around that I don't use and plan to put them up on eBay for reselling. I want to make sure them sold without any data left inside.

For this situation, I highly recommend AOMEI Partition Assistant Professional. It is compatible with Windows 10/8/8.1/7/XP/Vista. With an intuitive interface, every user can easily choose the right disk and perform a wiping operation.

Besides, it provides four different methods to wipe a HDD: Fill sectors with Zero, Fill sectors with random data, DoD 5220.22-M and Gutmann. You can download the Demo Version and follow the below steps to learn how to clean a hard drive Windows 10.

Note: The data will be removed completely via this method and it’s impossible to recover them after that. So please be careful and back up important data to cloud or external at first.

Step 1. Install and launch AOMEI Partition Assistant Pro on your Windows 10 computer, right click the disk you want to wipe and choose “Wipe Hard Drive”.

Wipe Hard Drive

Step 2. In the subsequent window, you can choose a suitable wiping method from the 4 options according to your actual requirements. Then click “OK”.

Fill Sectors With Random Data

Step 3. Back to the main interface, click “Apply” on the top left corner to actually starting erasing the selected hard drive.

Apply Wipe Hard Drive

On completion, all data have been successfully wiped out from the hard drive. If you want to erase an SSD drive without hurting it, AOMEI Partition Assistant Professional’s “SSD Secure Erase Wizard” can satisfy you best.

SSD Secure Erase

Final Words

This is all about how to clean a hard drive Windows 10 via Command Prompt and professional hard drive wiper software. Besides wiping a hard drive clean, AOMEI Partition Assistant Pro offers many other fantastic functions such as recovering partition deleted accidentally, splitting a large partition into two or more small partitions, migrating OS to SSD drive and more. If you are running Windows Server, you can try AOMEI Partition Assistant Server.