What command can be used to totally wipe a hard drive clean, including the partitioning system?

653

653 people found this article helpful

Wipe a computer hard drive clean with these steps

Updated on November 11, 2021

What to Know

  • Back up everything you want to keep. Download and install a free data destruction program and wipe the drive following the instructions.
  • There are several ways to wipe a hard drive, but data destruction software is the easiest and allows the hard drive to be used again.

When you format a hard drive or delete a partition, you're usually only deleting the file system, making the data invisible or no longer actively indexed, but not gone. A file recovery program or special hardware often recovers the information. If you want to make sure that your private information is gone forever, you'll need to wipe the hard drive using special software.

Wiping a hard drive should work the same on any operating system, so long as you use a certain type of bootable tool (recommended below).

How to Wipe a Computer Hard Drive

This process could take several minutes to several hours depending on how big the drive is and what method you choose.

  1. Back up anything you want to keep, such as photos, software product keys, etc. When the hard drive wipe is complete, there will be absolutely no way to get anything on the drive back.

    Back up everything you want to keep; sometimes several virtual drives share space on a single physical hard drive. View the drives (volumes) that sit on a hard drive from the Disk Management tool in Windows.

  2. Download a free data destruction program. Any of the first six programs we recommend on that list will work great because they can be used to wipe a hard drive from outside of Windows, a necessary feature if you want to wipe the drive that Windows is installed on.

    We're big fans of DBAN, our first pick on that list. It's probably the most widely used hard drive wiping tool (but please know that it doesn't wipe solid-state drives). See our How to Wipe a Hard Drive With DBAN tutorial if you're nervous about hard drive wiping or prefer a more detailed walkthrough.

    There are actually several ways to completely erase a hard drive, but using data destruction software is the easiest and still allows the hard drive to be used again.

  3. Complete whatever steps are necessary to install the software or, in the case of a bootable program like DBAN, get the ISO image on a CD or DVD disc, or a USB device like a flash drive:

    If you're using a CD or DVD, this process usually involves burning the ISO image to a disc and then booting from the disc to run the program.

    If you're using a flash drive or other USB drive, this process usually involves burning the ISO image to the USB device and then booting from that USB drive to get started.

  4. Wipe the hard drive according to the program's instructions.

    Most data destruction programs offer several methods. If you're curious about the effectiveness or methods used to complete the wipe, see Data Sanitization Methods.

    Plug in your laptop or verify the battery's fully charged. The total time it takes to finish the HDD wipe depends on the size of the drive and the speed of the computer.

  5. When it's all said and done, you can be confident that whatever information was on the drive is now gone for good.

You can now install Windows on the drive, create a new partition, sell or give away the hard drive or computer, recycle or dispose of it, restore your backed up files, or whatever else you need to do.

6 Best Sites to Sell or Trade Used Electronics

A Simple Hard Drive Wipe Alternative

Beginning in Windows Vista, the format process changed and a single write-zero pass is applied to each standard (non-quick) format. In other words, a very basic hard drive wipe is performed during a format.

If a single write-zero pass is good enough for you, consider your drive wiped after a regular format. If you want something even more secure, follow the hard drive wipe instructions above.

This is a wipe of just the partition you're formatting. If you have more than one partition on a physical hard drive, you'll need to format those additional drives as well if you want to consider the entire physical disk as "wiped."

Is Shredding Files What You're Really After?

If what you really want to do is just make sure that files you delete on a regular basis are really gone and not retrievable with special tools, a data-wiping program is more than you need. See our list of free file shredder software programs for programs that "destroy" individual files on an as-needed basis.

Many of those shredder programs also do what's called a free space wipe, which is a wipe of all the "empty" space on your hard drive. The purpose of this is to ensure that the files you've already deleted are actually deleted for good.

Still confused? See Wipe vs Shred vs Delete vs Erase: What's the Difference?

FAQ

  • Can I wipe a hard drive without deleting Windows?

    While you can't truly wipe the hard drive without deleting the OS, if you reset Windows to its factory default settings, the process will erase personal files and applications on the system.

  • How do I wipe an external hard drive?

    Connect the drive to your computer, open File Explorer > This PC, and select the external drive. Right-click and select Format, click a file system, and follow the prompts.

  • How do I reinstall Windows on the wiped hard drive?

    To reinstall Windows, insert a Windows DVD or a USB drive with the Windows ISO, reboot the PC, and follow the install process prompts.

  • How do I reinstall macOS on a wiped Mac hard drive?

    To reinstall macOS after you've wiped the drive, open the macOS Utilities app, click Install macOS and follow the prompts.

Thanks for letting us know!

What command can be used to completely erase a partition on a hard drive?

To delete a partition:.
At a command prompt, type diskpart..
At the DISKPART prompt, type select disk 0 (Selects the disk.).
At the DISKPART prompt, type list partition..
At the DISKPART prompt, type select partition 4 (Selects the partition.).
At the DISKPART prompt, type delete partition..
At the DISKPART prompt, type exit..

How do I clean my hard drive using command prompt?

Follow the steps below to format a drive:.
STEP 1: Open Command Prompt As Administrator. Opening the command prompt. ... .
STEP 2: Use Diskpart. Using diskpart. ... .
STEP 3: Type List Disk. ... .
STEP 4: Select the Drive to Format. ... .
STEP 5: Clean the Disk. ... .
STEP 6: Create Partition Primary. ... .
STEP 7: Format the Drive. ... .
STEP 8: Assign a Drive Letter..

What does clean command do in diskpart?

Warning: Diskpart Erase/Clean will permanently erase/destroy all data on the selected drive. Please be certain that you are erasing the correct disk. From the diskpart prompt, type clean and press Enter. The drive's partition, data, and signature is now removed.

What are the Diskpart commands?

Section 1..
Delete Volume..
Create Partition..
Format Partition..
Assign Drive Letter..
Extend Partition..
Shrink Partition..
Mark Partition as Active..