How to Use CMD Command to Wipe Hard Drive on Windows 11
If you want to know how to use CMD command to wipe hard drive on Windows 11, you can refer to this post. It will share a step-by-step guidance to do it and another easier disk eraser on Windows 11.
What is CMD command?
CMD refers to Windows Command Prompt, which is a command-line program with powerful features including recovering lost files, assigning drive letters and converting disks from MBR to GPT, etc. In addition, the users can also effectively wipe a hard drive on Windows 11 through some input commands. If you want to learn more about erasing hard drives with CMD, please keep reading.
Why wipe the hard drive with CMD command on Windows 11?
When some Windows users want to sell or throw away their old computer for different reasons, for fear of losing important personal data, they may delete data or format the hard drive on Windows 11.
However, they may have ignored something: deleting or formatting data just makes them invisible on your PC, you haven't erased them completely. Because these deleted data can be retrieved through professional data recovery software!
Therefore, if you don't want to reveal important information, you need to use the CMD command to wipe the hard drive on Windows 11.
How do I use CMD command to wipe my hard drive on Windows 11
As mentioned above, to prevent accidental loss of personal data, it's quiet necessary to wipe the unneeded hard drive on Windows 11. With some commands, the Windows built-in CMD can effectively wipe the hard drive. The detailed steps are as follows.
Note: Please carefully check the input commands, if the commands are wrong, they will cause accidental loss of important data.
Please follow the steps below:
Step 1. Click "Start" on the interface and type "cmd". Then click "Run as Administrator".
Step 2. Type "format f: /fs:NTFS/p:1" (replace "f" with the target drive letter) and press "Enter".
Step 3. Type "y" and press "Enter" to wipe the data.
Step 4. After the process is completed, you’ll be prompted to enter a Volume label. Type a name of the drive or you can press "Enter" to skip it.
Step 5. Wait until "Creating file system structures" appears on the screen.
Clean all partitions to wipe data with DiskPart
Besides CMD, you can also try the Diskpart to wipe your hard drive, it is another Windows command line tool.
Step 1. Click "Start" on the interface and type "cmd". Then click "Command Prompt as Administrator".
Step 2. Type "diskpart" in the popped window.
Step 3. Input and run the following commands:
• list disk (list all disks on your computer.)
• select disk 2(Select the disk you want to wipe completely. )
• clean all (Delete all data from the selected disk.)
Step 4. Type "exit" and hit "Enter" to close this window.
Alternative to use CMD command to wipe hard drive
If you know much about the PC, CMD will effectively wipe the hard drive on Windows 11. But if not, using the CMD command to wipe hard drive on Windows 11 may cause some problems. Thus, to wipe the hard drive without the Command Prompt, you can try an easier alternative on Windows 11 .
AOMEI Partition Assistant is a user-friendly tool, it can wipe the target hard drive with four methods, Completely get rid out the possibility of data recovery. The whole process can be done in just a few simple steps.
Before you do:
▶ Please backup the important data you need, because once you wipe the hard drive, you cannot retrieve it.
▶ Due to the different storage methods of HDD and SSD, Wipe Hard Drive feature will shorten the lifespan of SSD. So if you want to wipe SSD on Windows 11 permanently, you can try the SSD Secure Erase function.
Step 1. Install and launch AOMEI Partition Assistant, click the "Wipe" main tab and select "Wipe Hard Disk" option. (You can also right-click the Disk you want to wipe and select the "Wipe Hard Drive" option.)
Step 2. Select the disk you want to wipe and click "OK" to continue.
In this stage, you can also select a wiping method to wipe the selected hard drive according to your requirements and click "OK". (By default, the wiping method is Fill in 0.)
Notes:
- Fill in 0: Overwrite all sectors with zeros. It is common to wipe a personal hard drive. It is safe and fast.
- Fill in random information: It overwrites the hard drive with random data. It is more secure than the first one.
- DoD 5220.22-M: It will overwrite addressable locations on the hard disk with binary 0's, binary 1's, and a random bit pattern from once to seven times. The more times you choose to overwrite, the longer the process will take. Three times to five times are recommended. It is more secure than "zero-filling" and "random data filling" and faster than the Guttman. Thus it is often adopted by companies and organizations.
- Gutmann: It overwrites a hard drive with 35 passes. It is the safest way here, but it also takes the longest time.
Step 3. You can preview the shrink operation by viewing the "Pending Operations". To commit the "Pending Operations", please click "Apply" and "Proceed".
Notes:
✍ There’re three other options in "Wipe Hard Drive" including Fill sectors with random data;(Safe, Quick), DoD 5220.22-M (Very Safe, Slow) and Gutmann (35 passes, Very Safe, Very Slow). If you want to select these safer and faster methods, please turn to AOMEI Partition Assistant Professional.
✍ If your computer fails to boot from the hard drive, AOMEI Partition Assistant allows you to create a Windows PE USB or CD to first boot your computer and then help you to successfully wipe the hard drive on Windows 11.
Conclusion
In this article, you may have learned the importance of wiping a hard drive and how to use the CMD command to wipe the hard drive on Windows 11. In addition, we also provide another freeware, which can not only help you wipe the hard disk, but also solve the problems like SSD not booting and can't resize partitions on Windows 11.
By the way, if you need to wipe the hard drive or partition on your Windows Server 2025, 2022, 2019, 2016, 2012 (R2), you can use AOMEI Partition Assistant Server.