To wipe a hard drive in Windows 11 with built-in tools, use DiskPart's clean all command from an elevated Command Prompt. This overwrites every sector on the selected disk, so verify the disk number carefully before continuing.
Warning: This permanently removes partitions and data from the selected disk. Disconnect unrelated external drives when practical.
Wipe a hard drive with DiskPart
Open Command Prompt as administrator.
Type diskpart and press Enter.
Type list disk to display all connected drives.
Type select disk X (replace X with the number of your hard drive).
Type clean all to securely wipe the disk.
Type exit once complete.
Clean versus clean all
clean removes partition and volume formatting information. clean all additionally writes zeros to every sector, which takes much longer but makes ordinary file recovery impractical. Microsoft documents both options in the DiskPart clean reference.
Verify the disk before erasing it
Use the size shown by list disk to identify the intended drive. After select disk X, run detail disk and confirm the model, capacity and volumes before entering clean all. The operation can take hours on a large drive.
For another built-in method, see how to securely wipe a disk in Windows.

Comments