How you wipe a hard drive on Windows 7 depends on which drive it is. For a second (non-system) drive, open an administrator Command Prompt and run format D: /fs:NTFS /p:1, which erases the drive and overwrites every sector with zeros. You can’t wipe the drive Windows is running from while Windows is running, so for the main drive, boot from Windows installation media and delete the partitions, or use your PC maker’s recovery tools. For SSDs, use the drive maker’s Secure Erase tool instead of overwriting.
Windows 7 has been unsupported since January 14, 2020. If you’re wiping the PC to retire or sell it, that’s a good time to move to a supported system.
Quick Answer
Second drive: admin Command Prompt > format D: /fs:NTFS /p:1. System drive: boot from installation media and delete or format the partitions, or use a bootable wipe tool.
Before You Start
- Back up anything you want to keep. Wiping can’t be undone.
- Note the drive letter carefully in Computer (This PC) or Disk Management.
- Deauthorize software licenses tied to the PC if needed.
Wipe a Secondary Drive
- Click Start, type cmd, right-click it and choose Run as administrator.
- Type format D: /fs:NTFS /p:1, replacing D: with the drive you want to wipe.
- Type Y to confirm. The zero pass can take hours on large drives.

Wipe the System Drive
- Boot from a Windows installation USB or DVD (or a newer Windows version’s media).
- Choose Custom installation, delete all partitions on the internal drive, and quit or continue installing a new system.
- For a thorough overwrite, use a reputable bootable disk-wipe tool from its official site.
Wiping Methods Compared
| Method | Best for | Notes |
|---|---|---|
| Quick format | Reusing a drive yourself | Data is recoverable |
| format /p:1 | Second hard drives before selling | One zero pass is enough for modern drives |
| cipher /w:D:\ | Wiping free space only | Keeps existing files |
| Manufacturer Secure Erase | SSDs | Overwriting is unreliable on SSDs |
| Physical destruction | Failed drives with sensitive data | Use a certified service |
Troubleshooting
- “Access denied”: Command Prompt isn’t running as administrator.
- Drive is in use: Close programs using it, or wipe from installation media.
- Wiping an external drive on newer Windows? See wiping an external hard drive.
- Retiring the PC? Save your key first; see finding a Windows 7 product key.
Frequently Asked Questions
Is one pass enough?
For modern hard drives, a single overwrite is generally considered sufficient.
Does formatting delete everything?
A quick format doesn’t; data can be recovered. Use /p:1 or a wipe tool.
Summary
- Back up and identify the right drive.
- Use format /p:1 for secondary drives.
- Use installation media or a wipe tool for the system drive.
- Use Secure Erase for SSDs.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.