[Solved] How to Wipe A Computer Hard Drive Completely

Before selling or giving away your computer, it's a good idea to wipe out a hard drive to prevent data leakage. Here, you are going to learn how to wipe a computer hard drive on Windows 11, 10, 8, 7, as well as Vista, and XP.


By Tina / Updated on May 12, 2023

Share this: instagram reddit

Need to wipe a computer hard drive


"I want to throw away my old computer, but will my private data be leaked? Is it possible to completely delete the data or format the computer so that my information is not exposed? If there are still hidden dangers, is there a better way?"


Many users deleted data or formatted the hard drive before selling or throwing away their computers to prevent the leakage of personal information. However, they may have confused the functions of deleting files, formatting and wiping the hard drive:

● Delete files on hard drive: Deleting files refers to marking the disk location occupied by the deleted files as "free space", so the deleted files just are invisible on the computer. What's more, before the deleted files or partitions are overwritten with new data, they can be easily recovered with some recovery software.

● Format hard drive: Formatting a hard drive has the same effect as deleting files, but formatting a hard drive marks the entire drive as free space. The wiped data can also be retrieved by some professional recovery tool.

● Wipe hard drive: Wiping a hard drive refers to completely removing all data, it is the most effective way to ensure the complete destruction of important files including confidential information and any other type of data from the hard drive. It is much safer than deleting data or formatting the hard drive, because the wiped data can never be recovered.

As mentioned above, data cannot be completely removed from the computer with deleting or formatting operations. So in order to protect against personal data leakage, you'd better wipe your hard drive. This article will provide you with the answers on how to wipe a computer hard drive permanently.

Wiping a computer hard drive with Command-line

Command Prompt and Diskpart are the commonly used command-line interpreter applications in most Windows operating systems. When encountering some system problems, users can open the command prompt by typing "cmd" in the search box, and then execute the entered commands to solve the problems. Please refer to the following steps to wipe a laptop hard drive.

Before proceeding, please confirm that the commands you entered are correct to prevent accidental data loss.
This operation will wipe all data on your hard drive, so please back up important data you need in advance.

♦ Wipe a hard drive via Command Prompt

First of all, you can wipe a computer hard disk by formatting the f drive with the NTFS file system and write zeros to the hard drive for a single pass. Please read the following steps carefully:

Step 1. Press "Windows" and Input "cmd", then select "Run as administrator".

Step 2. Type "format f: /fs:NTFS/p:1 " (replace "f" with the drive which you want to wipe) 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 the name of the drive or you can press "Enter" to skip it.

Step 5. Wait until "Creating file system structures" appears on the screen.

diskpart zero fill hard drive


♦ Using Diskpart to wipe a computer hard drive

Diskpart is another command line utility that can completely delete the hard disk data. The purpose of wiping the hard drive is achieved by cleaning all data on it. The detailed steps are as follows:

Step 1. Press "Windows"  and type "cmd". Then click "Run as Administrator".

Step 2. Input "diskpart" in the ejected window and hit "Enter".

Step 3. Input and run the following commands and press "Enter":

• 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.)

diskpart clean hard drive

How do I wipe a computer hard drive with Disk Management?

Command-line will be useful to permanently erase the computer hard drive through some command you typed. Besides, Disk Management is a Windows built-in tool that can help you manage hard disk partitions without restarting the system. It can wipe a computer hard drive with a more figurative interface and easier operations than the Command-line. Apart from cleaning hard drive, this powerful tool can also help you create and resize partitions. Here’re detailed steps on how to wipe a laptop hard drive.

When your hard drive becomes a RAW due to file system corruption, the Format button will be greyed out.
In Disk Management, you can’t format a partition over 32GB into FAT32.
When the hard disk is write-protected, it cannot be formatted

Step 1. Press "Windows+R" and input "diskmgmt.msc" in the popped window.

Step 2. Right-click the hard drive you want to wipe and click "Format".

click format

Step 3. If you want to wipe the partition deeply, don't select "Perform a quick format" and click "OK".

click OK

How to wipe a computer hard drive permanently(recommend)

After reading the steps on how to wipe a computer hard drive completely in Command line and Disk Management, you may be concerned that you will lose important data if you input the wrong commands or select the other partitions accidentally during the process. Besides, due to the limitations of the file system and partition size, you can also have difficulty wiping your hard drive.

In this case, you can use AOMEI Partition Assistant Standard. With a clear and friendly interface, you can safely wipe your a computer hard drive with a few clicks. More important, it breaks through the limitations of Disk Management and Command line. You can also use it to wipe hard drives with any file system or partition size, and this freeware works well on all versions including Windows 11/10/8/7/Vista/XP.

Please download it to learn how to wipe a PC hard drive completely.

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

Before you do:
Wiping the hard disk will completely delete the data on it, so please backup the important data in time before your operation.
If you need to wipe the system hard drive, you can create a bootable device and clean it in Windows PE mode. 
Because the Wipe Hard Drive function is mainly used for HDD, forcibly using this function to wipe the SSD will shorten the lifespan of SSD. So, if you want to safely wipe SSD on Windows 11, you can try the SSD Secure Erase feature.

Step 1. Install and open AOMEI Partition Assistant Standard and right-click the hard drive you decide to wipe, and select "Wipe Hard Drive".

Wipe Hard Drive

Step 2. Select "Fill sectors with Zero" and then click "OK".

click OK

Step 3. Click "Apply" in the top left of the interface to execute the operation.

click apply

You can repartition this hard drive after you wipe it, because it will become blank.
In addition to Fill sectors with Zero, you can also use Fill sectos with random data, Gutmann and DoD 5220.22-M feature to wipe this hard drive.


Now, you should already know that the most effective way to prevent data leakage is by wiping the hard drive. In this post, you can learn how to wipe a computer hard drive completely with Command Prompt and Disk Management.

When none of the above methods are suitable, you can turn to AOMEI Partition Assistant, which can not only permanently wipe the hard disk, but also have other disk managing functions, such as Merge Partitions and Clone disk.

Besides, if you are a Windows server user, AOMEI Partition Assistant Server is specially designed for you to optimize server performance.

Tina · Staff Editor
Tina is an English editor of AOMEI Technology. She has a positive attitude and full of energy. On her work, she always keeps thinking to figure out the solutions for users' problems, and writes the answers so that can help someone. In her daily life, she likes to sing, watch TV and sleep. She always being grateful and happy to all the things happened and all the people encountered.