Table of Contents
DiskPart’s clean removes partition information from the selected physical disk. clean all writes zeros across sectors that Windows can address. Both apply to the whole disk, so selecting a disk that contains several drive letters can affect all of those volumes.
Identify the disk before running an erase command
Back up every volume you want to keep and open a few files from the backup. Disconnect nonessential external drives. Use Disk Management to check which physical disk contains your target volume. If you only need to format one partition, use that volume’s Format command instead.
- Open Command Prompt as administrator and run
diskpart.
- Run
list diskand identify the target by size. Disk numbers can change when drives are reconnected.
- Enter
select disk Nwith the correct number, thendetail disk. Compare the reported model and volumes with the target. If the result is ambiguous, exit without erasing anything.
Choose the action that fits
clean: Removes partition information quickly so you can repartition the disk. The underlying file data may still be recoverable.
clean all: Overwrites the disk’s addressable sectors and can take a long time. Confirm the physical disk again before issuing the command. On an SSD or drive with remapped sectors, this is not proof that all physical locations were sanitized.
See Microsoft’s DiskPart clean reference. A disk meant for reuse can be initialized and given a new partition in Disk Management after the operation. If Windows still cannot use it, see how to diagnose a drive that won’t format.
When disposing of a drive with sensitive data
Use a sanitization method appropriate to the device and the data. A supported manufacturer sanitize or secure-erase feature may be appropriate for an SSD. Follow your organization’s process for managed devices. If you are troubleshooting a failing drive and need its files, prioritize recovery before writing to it.
Reader Comments 0
Sign in with email or Google to join the discussion.