BEFORE selling or throwing away a machine I cleaned the drive.
Building onto Parting the Disk we can see how DiskPart might be applied to clean up drives BEFORE selling or throwing away a machine. I did not have a machine convenient to test the cleaning of drives, but I DID have a Windows 10 Install USB, so that will have to do for the purposes of this test…
First, looking at the drive in explorer there are files present. I am going to skip the highly technical part where ‘files in explorer we see are pointers to the actually data” in favor of “deleting the picture does not make the file disappear completely. To prove that the files are not actually removed, I am going to look at the drive in a hex editor which will show the bits on the drive, the actual data and more than the picture in the file explorer.




Now, we see we have files and data, so now comes DiskPart and use the clean command, and see what we have left in the same spots as before …



So, even after ‘cleaning’ the drive the bits are still present, which means that even though we do not see files when we look at the drive in Explorer, they can be put together some way. Now for giggles, we know that if we create a partition now on this “empty” drive there will be no files … but will the data still exist that could be recovered? Again, we DiskPart and this time run the commands to Create Partition Primary.



From the looks of it, part of the data looks different – meaning the files are “missing”, but the actual bits of the data are still left behind. This means that the bits could be recovered and the files put back together … not a great cleaning method. Maybe there is another way the drive could REALLY be cleaned …
Looking at the drive in explorer there are files present. I will still skip going into the highly technical part where ‘files in explorer we see are pointers to the actually data” in favor of “deleting the picture does not make the file disappear completely. To prove that the files are not actually removed, I am going to look at the drive in a hex editor which will show the bits on the drive, the actual data and more than the picture in the file explorer.




Now, we see we have files and data, so now comes DiskPart and use the cleanall command, and see what we have left in the same spots as before …



Judging by the fact that there is a whole lot of zeros there, the drive is clean and data irretrievable, so if I did want to save something off there … I cannot anymore. For now, this wraps up my ranting about DiskPart and how it can clean up files you do not want people to find. I wanted to look at this myself for a while, and hopefully it helped out and now second-hand drives will be clean from now on.