TechBuzzPro

How to Wipe an External Hard Drive Securely

· 6 min read · Windows & PC

In this article
  1. What You’ll Need
  2. Step‑By‑Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes—you can wipe an external hard drive by formatting it and, if you need strong privacy, overwriting the free space so the data cannot be recovered.

What You’ll Need

  • A computer running Windows, macOS, or a Linux distribution.
  • The external hard drive you want to erase (connected via USB, Thunderbolt, or eSATA).
  • Administrative privileges on the computer.
  • Optional: a third‑party wiping utility such as CCleaner, Eraser, or BleachBit for more passes.

Step‑By‑Step

  1. Back up anything you still need. Once the wipe begins, all data will be irretrievable. Copy required files to another drive or cloud storage.
  2. Identify the drive letter or device name.
    • Windows: Open Disk Management (right‑click Start ► Disk Management) and note the volume label and drive letter (e.g., E:).
    • macOS: Open Disk Utility (Applications ► Utilities ► Disk Utility) and note the device name, such as /dev/disk2.
    • Linux: Open a terminal and run lsblk or fdisk -l to locate the external drive (e.g., /dev/sdb).
  3. Choose the wiping method.
    • Quick format – removes the file system table only; data remains recoverable with forensic tools.
    • Full format with zero‑fill – writes zeros across the entire disk, making most consumer‑grade recovery impossible.
    • Multi‑pass overwrite – follows DoD 5220.22‑M or similar standards, writing random data several times for higher security.
  4. Windows: Use Diskpart for a zero‑fill.
    1. Press Win+X and select Windows Terminal (Admin) or open Command Prompt as administrator.
    2. Type diskpart and press Enter.
    3. Enter list disk – note the number of the external drive.
    4. Type select disk X (replace X with the correct number).
    5. Run clean all. This command writes zeros to every sector. Expect several hours for large drives.
    6. When the operation finishes, type exit twice to close Diskpart.
    7. Open Disk Management, create a new partition, and format it with NTFS, exFAT, or your preferred file system.
  5. macOS: Use Disk Utility or the diskutil command.
    1. Open Disk Utility, select the external drive in the sidebar (not just the volume), and click Erase.
    2. Choose a format (APFS, Mac OS Extended, exFAT) and click Security Options… if available. Move the slider to the desired number of passes (1‑Pass = single zero‑fill, 3‑Pass = random data, 7‑Pass = DoD standard).
    3. Click Erase to start. The UI will display progress and completion.
    4. Alternatively, open Terminal and run:
      diskutil list   # locate /dev/diskN
      sudo diskutil secureErase 0 /dev/diskN   # 0 = single-pass zero fill
      sudo diskutil secureErase 1 /dev/diskN   # 1 = single-pass random
      sudo diskutil secureErase 2 /dev/diskN   # 2 = 7‑pass DoD
      Replace /dev/diskN with your drive identifier.
  6. Linux: Use dd or shred for overwriting.
    1. Open a terminal with root privileges (e.g., sudo -i).
    2. Confirm the device name (e.g., /dev/sdb) using lsblk.
    3. Zero‑fill with dd:
      sudo dd if=/dev/zero of=/dev/sdb bs=4M status=progress
      This writes zeros across the whole drive. Replace /dev/sdb accordingly.
    4. For a multi‑pass random overwrite, use shred:
      sudo shred -v -n 3 -z /dev/sdb
      -n 3 = three random passes, -z adds a final zero pass.
    5. After the overwrite finishes, create a new partition table with gdisk or parted, then format the new partition with mkfs.ext4, mkfs.ntfs, etc.
  7. Verify the wipe. Re‑mount the drive and run a quick file‑system check (Windows: chkdsk, macOS: diskutil verifyVolume, Linux: fsck) to ensure the new file system is healthy. Optionally, use a recovery tool such as Recuva (Windows) or TestDisk (macOS/Linux) to confirm no old files are detectable.

Common Mistakes

  • Wiping the wrong drive. Accidentally selecting the internal system disk instead of the external one will erase your OS. Always double‑check the disk number or device name before issuing destructive commands.
  • Using “Quick Format” when you need privacy. Quick format only rebuilds the file‑system table; data remains on the platters and can be recovered with free tools.
  • Interrupting the overwrite process. Power loss or forced shutdown mid‑write can leave sectors partially overwritten, creating a mixed‑state that may still contain recoverable fragments.
  • Skipping verification. Assuming the wipe succeeded without checking can hide errors like bad sectors that stopped the write early.
  • Choosing an incompatible file system. Formatting a drive for a device that does not support the selected file system (e.g., NTFS on a TV that only reads exFAT) will make the drive appear empty but unusable.

Tips

  • For SSD‑based external drives, prefer the built‑in Secure Erase command (e.g., hdparm --secure‑erase on Linux) instead of sector‑by‑sector overwrites, which can wear the flash cells.
  • When using Windows Diskpart, the clean all command automatically creates a new partition table after completion, saving an extra step.
  • Set the security‑options slider to the highest level only if you truly need DoD‑level protection; each extra pass multiplies the time required.
  • If you plan to donate or sell the drive, a single‑pass zero fill is generally sufficient for most buyers, while a multi‑pass wipe adds a layer of confidence.
  • Keep the drive connected to a reliable power source; large USB‑C hubs sometimes under‑power high‑capacity drives, causing write errors.

Troubleshooting

  • The drive is not listed in Disk Management / Disk Utility / lsblk. Try a different USB cable or port, ensure the drive powers on, and check Device Manager (Windows) or dmesg (Linux) for hardware errors.
  • Diskpart reports “Access denied” or “The disk is in use”. Close any Explorer windows, disable BitLocker, and run diskpart as administrator. If the drive is a system‑reserved partition, you may need to boot from a Windows PE USB to erase it.
  • macOS security options are greyed out. The drive may be formatted with APFS or a case‑sensitive format that does not support the built‑in secure erase. Re‑format the drive to Mac OS Extended (Journaled) first, then use the security slider.
  • Linux dd hangs or shows “No space left on device”. Verify you are writing to the raw device (/dev/sdb), not a partition (/dev/sdb1). Also confirm the drive is not mounted; unmount with umount /dev/sdb1 before overwriting.
  • After wiping, the drive shows as “Unallocated” and cannot be formatted. The drive may have developed bad sectors. Run a diagnostic tool from the manufacturer’s website (e.g., Seagate SeaTools) and consider replacing the drive if errors persist.

Frequently Asked Questions

Is a quick format enough to protect my data?

No. A quick format only removes the file‑system table; the underlying data remains on the platters and can be recovered with free recovery software.

How many passes do I really need?

For most personal privacy needs, a single pass of zeros or random data is sufficient. Multi‑pass (3‑ or 7‑pass) overwrites are useful only for highly sensitive or classified information.

Can I use the same method on a USB flash drive?

Yes, but flash memory benefits from a built‑in Secure Erase command rather than repeated overwrites, which can reduce the drive’s lifespan.

Will wiping the drive erase hidden partitions?

Yes, when you use a low‑level tool like diskpart clean all or dd on the whole device, every sector—including hidden or recovery partitions—is overwritten.

Do I need special software for a Mac‑only external drive?

No. macOS’s Disk Utility includes a “Security Options” slider that performs zero‑fill or multi‑pass overwrites without third‑party tools.

What should I do if the wipe process takes too long?

Large drives (4 TB and above) can require many hours for multi‑pass wipes. You can abort after a single zero‑fill if time is limited, then verify that the data is unrecoverable with a recovery utility.