How to Zero-Fill a Drive Using DiskPart

If you want to completely wipe a drive by writing zeros to every sector, you can use DiskPart’s clean all command. This is useful for securely erasing data before selling, repurposing, or disposing of a drive.

⚠️ WARNING

This will erase everything on the selected disk. All partitions, data, and boot sectors will be permanently removed. Make absolutely sure you’re selecting the correct drive.

✅ Step-by-Step Instructions

  1. Open Command Prompt as Administrator
    Click Start, type cmd, right-click it, and choose “Run as administrator.”
  2. Launch DiskPart
    diskpart
  3. List all disks
    list disk
    Identify the disk you want to wipe based on its size.
  4. Select the correct disk
    select disk X
    Replace X with the number of the disk you want to erase.
  5. Double-check your selection (optional but smart)
    detail disk
    Confirm it’s the correct one before continuing.
  6. Zero-fill the drive
    clean all
    This writes zeros to the entire drive. It may take a while depending on the drive size.

🧠 Notes

  • clean only removes the partition table — it does not overwrite data.
  • clean all writes zeros to the entire disk — this is a proper data wipe.
  • For DoD-style multi-pass wiping, you’ll need a third-party tool like DBAN or a PowerShell script loop.

Similar Posts