TechBuzzPro

How to Wipe a Hard Drive Before Selling

· 7 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

Before selling or giving away a computer, wiping the hard drive is essential to protect your personal data. A simple delete or format is not enough—data can be recovered with free tools. This guide shows you how to securely erase a drive on Windows, macOS, and Linux, including what to do if your computer won't boot. You'll need a backup of any files you want to keep, and depending on your method, a USB drive with a bootable tool or your system's recovery options.

What You'll Need

  • A backup of any files you want to keep (external drive, cloud storage, etc.)
  • For Windows: a USB drive (8GB or larger) if you need to create a bootable installer or use a live Linux USB
  • For macOS: an internet connection for macOS Recovery, or a bootable USB installer if you prefer
  • For Linux: a live USB or a terminal (if you're already booted)
  • Optional: a USB-to-SATA adapter if you plan to wipe a drive externally

Step-by-Step

Important: The exact menu names and options can vary slightly by operating system version and device manufacturer. If you don't see an exact label, look for a similar option in the same area.

Windows 10/11

  1. Back up your files. Copy anything you want to keep to an external drive or cloud service. Double-check that you have everything, because wiping will erase all data permanently.
  2. Sign out of all accounts and deauthorize software. Sign out of Windows, Microsoft Office, iTunes, Adobe, and any other apps that tie to your identity. This prevents the next owner from accessing your accounts.
  3. Open Settings. Press Win + I to open Settings, then go to Update & Security (Windows 10) or System (Windows 11).
  4. Find the reset option. In Windows 10, click Recovery in the left sidebar. In Windows 11, click Recovery in the right pane.
  5. Start the reset. Click Reset this PC (Windows 10) or Reset PC (Windows 11), then click Get Started.
  6. Choose “Remove everything.” You'll see two options: “Keep my files” and “Remove everything.” Select Remove everything to wipe all personal data and apps.
  7. Select “Change settings.” On the next screen, click Change settings to access advanced options.
  8. Turn on data cleaning. Toggle on Clean data? (or “Clean the drive?”) and confirm. This overwrites the drive with zeros, making data recovery much harder. If you don't see this option, your drive is an SSD and Windows may not offer it—that's fine, because SSDs use wear-leveling that makes recovery unlikely.
  9. Choose “Delete files and clean the drive.” Click Next, then follow the prompts. Windows will restart and begin the process, which can take an hour or more depending on drive size.
  10. Complete the out-of-box setup. After the wipe, Windows will boot to the setup screen. At the “Who owns this PC?” screen, press Ctrl+Shift+F3 to enter audit mode, or simply shut down the PC by holding the power button. Do not complete the setup, as that would create a new user account.

macOS (all recent versions)

  1. Back up your files. Use Time Machine or copy files to an external drive. Sign out of iCloud, iTunes, and iMessage (in System Preferences > Apple ID).
  2. Restart into macOS Recovery. Shut down your Mac, then turn it on and immediately press and hold Command + R until you see the Apple logo or a spinning globe. Release when the recovery screen appears.
  3. Open Disk Utility. In the macOS Recovery window, select Disk Utility and click Continue.
  4. Select your startup disk. In Disk Utility, select your internal drive (usually “Macintosh HD”) in the sidebar. Make sure you select the drive itself, not the volume listed below it.
  5. Erase the drive. Click Erase in the toolbar. Choose a name (any name works), and for Format choose APFS (or Mac OS Extended (Journaled) if you're on an older Mac). For Scheme, choose GUID Partition Map.
  6. Click Erase again. Disk Utility will erase the drive. If you want a more secure wipe (especially for a traditional hard drive), click Security Options before erasing and choose a higher number of passes. For SSDs, this is unnecessary because of how SSDs handle data.
  7. Quit Disk Utility. Go to Disk Utility > Quit Disk Utility to return to the recovery menu.
  8. Reinstall macOS (optional). If you want to leave the Mac with a fresh system, choose Reinstall macOS and follow the prompts. Otherwise, shut down the Mac by selecting Apple menu > Shut Down.

Linux (using a live USB)

  1. Back up your files. Copy important data to external storage.
  2. Create a bootable Linux USB. On another computer, download a Linux distribution like Ubuntu and use a tool like Rufus (Windows) or Etcher (macOS/Windows) to write the ISO to a USB drive.
  3. Boot from the USB. Insert the USB into your Linux PC, restart, and press the boot menu key (often F12, F2, or Esc) to select the USB as the boot device. Choose “Try Ubuntu” (or similar) to boot into the live environment.
  4. Open a terminal. Press Ctrl+Alt+T to open a terminal window.
  5. Identify your drive. Type lsblk and press Enter. Look for your internal drive (e.g., sda, nvme0n1). Be absolutely certain you have the right drive—wiping the wrong one will destroy your data.
  6. Wipe the drive. Use the dd command to overwrite the drive with zeros. Replace /dev/sdX with your actual drive identifier (e.g., /dev/sda). Type: sudo dd if=/dev/zero of=/dev/sdX bs=1M status=progress and press Enter. This will take a while for large drives.
  7. Verify (optional). After the command finishes, you can check that the drive is all zeros with sudo od -An -tx1 /dev/sdX | head. It should show only zeros.
  8. Shut down. Type sudo shutdown now and remove the USB when prompted.

Common Mistakes

  • Only deleting files or doing a quick format. This leaves recoverable data. Always use a full erase or overwrite method.
  • Not backing up. You can't get files back after a wipe. Double-check your backup.
  • Choosing the wrong drive. Wiping the wrong drive (e.g., an external drive with your backup) is catastrophic. Always verify the drive letter or identifier.
  • Forgetting to sign out of accounts. The next owner could access your cloud accounts if you leave them signed in.
  • Interrupting the wipe. Powering off mid-wipe can leave the drive in an inconsistent state. Let it finish.

Tips

  • For SSDs, use the manufacturer's tool if available. Many SSD makers (Samsung, Crucial, etc.) offer a “Secure Erase” utility that resets the drive to factory state and is faster than overwriting.
  • For traditional hard drives, a single pass of zeros is usually enough for most sellers. If you're paranoid, use multiple passes, but it's rarely necessary for consumer resale.
  • If your computer won't boot, use a live USB. You can still wipe the drive from the live environment.
  • After wiping, you can leave the drive empty or reinstall the OS. Many buyers prefer a working system, but an empty drive is fine if you mention it.

Troubleshooting

If the reset fails or gets stuck: Restart your PC and try again. If it still fails, use a Windows installation USB to boot, then choose “Repair your computer” > “Troubleshoot” > “Reset this PC.” If that doesn't work, you can use a live Linux USB to wipe the drive manually.

If Disk Utility won't erase your Mac's drive: Try booting into Internet Recovery (press Command+Option+R at startup) and then use Disk Utility. If the drive is failing, you may need to replace it.

If the dd command gives an error like “No space left on device”: That's normal—it means the drive is full of zeros. The command completed successfully.

If you can't boot from a USB: Check your BIOS/UEFI settings to enable booting from USB, or use a different USB port (try a USB 2.0 port).

Frequently Asked Questions

Is a quick format enough?

No. A quick format only removes the file system, not the actual data. Anyone with recovery software can still retrieve your files. You need a full erase or overwrite.

Does wiping an SSD wear it out?

Not significantly. Modern SSDs have wear-leveling that distributes writes, and a single full overwrite is negligible compared to the drive's lifespan. Using a manufacturer's Secure Erase is even gentler.

How long does a wipe take?

For a 1TB hard drive, overwriting with zeros can take 1-3 hours depending on speed. SSDs are faster, often under 30 minutes. The reset option in Windows can take similar time.

Can I wipe a drive that has Windows on it and then install Linux?

Yes. After wiping, you can install any operating system. The wipe doesn't leave any OS behind, so you'll need installation media for the new OS.

What if I don't have a USB drive?

You can still wipe a working Windows or Mac using the built-in reset/erase options. For a non-booting computer, you'll need a USB drive to boot a live system.

Should I remove the drive and wipe it on another computer?

That's a good option if your computer won't boot. Use a USB-to-SATA adapter or connect it as a secondary drive on another PC, then wipe it using the methods above.