How to Destroy Hard Disk Data using CMD [ Two Ways]?

Refer to this post to get to know how to destroy hard disk data using CMD for cleaning HDD or wiping HDD data completely.


By Bryce / Updated on May 12, 2023

Share this: instagram reddit

Why need to destroy hard disk data?

Typically, people choose to destroy all data saved on the hard disk for the two following reasons:

▪  To reclaim disk space: When a hard disk is running out of space with unnecessary data, you want to remove the data from it to free up disk space. This aim can be achieved easily through formatting or deleting existing partitions on the HDD using CMD.
▪  To prevent personal information leakage: Before selling or donating your hard disk, it’s reasonable to destroy data completely and make the data hard to be recovered. Usually, you can choose to overwrite the hard disk with zero using CMD.

How to destroy hard disk data using CMD?

Based on your specific demand, you can choose a way to destroy hard disk data using CMD correspondingly. If you just want to get rid of data on your hard disk drive for freeing up disk space, you can apply the first way. If you need to erase hard disk totally to prevent data from being retrieved easily, the second way should be your choice.

Method 1. Deleting all partitions using CMD

This way will remove all partitions and data from your hard disk. But the deleted data and partitions can be recovered easily by reliable data recovery software.

Step 1. Press Windows + R simultaneously, input cmd, and click OK to open CMD interface.

Step 2. Input diskpart and press Enter.

Step 3. Then, run the commands listed below in order:

▪ list disk
▪ select disk n
▪ clean

> > > “n” is the disk number of the hard disk whose data needs to be destroyed.

After cleaning your HDD, you can create a new partition on it for reuse by running the following command:

▪ create partition primary
▪ select partition 1
▪ format fs=ntfs quick (or format fs=fat32 quick)
▪ assign drive letter=f
▪ active (if you want to reinstall operating system on the disk)

Method 2. Zero fill the hard disk using CMD

This way can destroy data on the hard disk through overwriting zeros and can prevent most hardware-based and all software-based file recovery software from recovering data. Now, see the detailed steps.

Step 1. Run Command Prompt as administrator.

Step 2. At the pop-up window, type “format f: /fs:NTFS /p:1.

(This command will format the f drive with the NTFS file system and write zeros to every sector of the drive once.)

Step 3. Type “y” and press Enter.

Step 4. After the format, type a name for the drive as volume label or don’t and press Enter.

Step 5. Wait for “Creating file system structures” to display.

Step 6. Type exit and hit Enter to close the window.


▪ A single pass of zero supposed to be able to prevent all software-based file recovery software from extracting information. Or to be more secure, you can replace p:1 with p:2 to do two passes of zeros to the drive.
▪ This process can take a long time to complete. The larger the drive is, the longer time it will take. Keep patient.
▪ If there are two or more partitions on your hard disk, you can repeat these steps to each partition.

Destroy hard disk data with a great GUI software for Windows

Now, you have known how to destroy hard disk data using CMD for different purposes. But if you are unfamiliar with CMD, the process can be a little bit complicated. Here you can turn to a free & helpful disk wipe software, AOMEI Partition Assistant Standard.

① It has a user-friendly & concise graphical interface AND can be supported by Windows 10/8.1/8/7, XP and Vista. With it, you can fill your hard disk with zeros easily and effectively.
② It is featured with Make Bootable Media function, enabling you to create Windows bootable USB/CD. Then, you can boot your PC from the bootable media and wipe system hard disk.
③ And its Pro edition, offers other 3 wiping methods as well: fill sectors with random data, DoD 5220.22-M & Gutman.

Now, take a closer look at how it destroys hard disk data within few steps.

Download Freeware Win 10/8.1/8/7/XP
Secure Download

Step 1. Install and fire up the software. Right-click the hard disk whose data are going to be wiped, choose Wipe Hard Drive

Step 2. In the pop-up windows, choose the first option: Fill Sectors with Zeros (Safe, Quick) and click OK button.

Step 3. In the main interface, click Apply and Proceed to execute the operation.


Bryce · Staff Editor
Bryce is an editor of AOMEI Technology, he covers backup & restore, hard disk & partitions management, cloud files transfer, website & database backup and so on for AOMEI. He enjoys helping people find solutions to their problems. He loves traveling, Sleeping, reserching and so on. He enjoys helping people find solutions to their problems. He loves traveling, Sleeping, reserching and so on. He would like to spend all time on reaserching computer problems. He is a very cute boy.