Diskpart is Microsoft’s disk partitioning command line tool and while it works well, it does not provide some protections from self inflicted wounds. One common DISKPART command to wipe a disk is CLEAN.
CLEAN removes the volumes and partitions along with changing the first letter of every file to a ‘?’. Files that start with a ‘?’ are not shown in NTFS (i.e. dir command or in Windows Explorer) and the file system knows the space they are taking can be overwritten. While that is fine for 99% of use cases, there is the outstanding case of how to overwrite all data on a disk so that it can not be recovered. For that, Microsoft made CLEAN ALL.
CLEAN ALL will not only remove the volumes and partitions, but also overwrite the entire disk with zero’s, thereby destroying any data on the disk and ensuring it cannot be recovered. For the record, yes, the US CIA, Israeli Mussad and the Russian FIS will be able to recover some data from these types of disks, but you don’t likely have access to such unlimited resources.
Because CLEAN ALL is writing to every block and sector on the disk, it often takes hours to complete. That is time most people just don’t have, so the question is how do you stop it.
Under Windows 10 (and we are 98% sure all previous versions of Windows), there is no command to stop the CLEAN ALL command. Some sites claim you can stop it using the OFFLINE DISK / ONLINE DISK command or by pressing CNTL+C to end DISKPART but as you can see in the screenshot to the right, that is not the case.
The only way to stop a CLEAN ALL command is to stop the disk:
- In the case of an internal disk that means rebooting
- In the case of an external disk that means unplugging it
This will not physically damage the disk. You will simply need to start the CLEAN again as we explain HERE and this time, don’t do a CLEAN ALL.
1 Comment
faq · June 27, 2023 at 10:49 am
was adviced not to do a clean all for SSD as it reduces its read and write/lifespan, i also ended up interrputing a clean all command by restarting and encountered
Error Code 0xc000000
followed this steps from: @sethb9554
1. From your recovery drive (usually X:), search for your drive with your windows installation by typing dir c: then dir d: dir e: so you know which one it is.
2. Type bcdboot E:\windows ( Mine was on E: )
3. Restart.
just leaving here in case someone has the same problem! thank you for the guide!