Safely delete hard disk or USB stick with DISKPART

Safely delete hard disk or USB sticks with DISKPART

If you try to securely erase data carriers , it is unfortunately not as easy as it may sound. Various tools have been available for years to restore the information from “deleted” data carriers . Those who pass on data media and do not delete the data thoroughly beforehand can find a nasty surprise afterwards.

Data carriers that are only deleted with the command format , for example , are marked as empty, but appearances are deceptive. Only the so-called table of contents of the formatted disc is deleted. All files, files and folders are still on the disk. The recipient of the hard disk only has to restore the table of contents and can then work with the data unhindered.

Therefore, it is extremely important that you delete the data really ” safely ” and overwrite every single sector of the disk . Only in this way can you be sure that the data cannot be recovered afterwards. Perhaps the best known tool for this is the ” Eraser “, which is very often used to securely erase data carriers.

But Windows also comes with standard tools that you can use to erase your data media quickly and easily. The command is

Diskpart

and also serves to erase data carriers . A distinction is made between fast and secure deletion.

Erase disk quickly

First you have to open an MS-DOS command prompt, which must have “ administrator rights ”. Then the ” diskpart ” command is called. About the command

list disk

you can then view the installed and connected data carriers. USB sticks are also displayed here. With the following command you select the disk to be deleted

select disk 1

Then, as you can see below, it appears that the desired data medium has been selected. With the following command you then cause the disk to be deleted.

clean

Erase disk with diskpart quickly

The process only takes a few seconds, after which the disk is deleted. But be careful, in this case recoverable.

Delete disk securely with Diskpart

We will now do the same thing again, but with one change. We exchange the ” clean ” command with the following command

clean all

So the whole process looks like this.

Safely delete disk with Diskpart

The whole process is the same as above, only that the delete command is now called ” clean all “. This means that the Diskpart program overwrites all sectors of the hard disk or USB stick individually and therefore the data cannot be restored. However, this process takes considerably longer than with quick deletion. According to our tests, it takes about 30-45 minutes for a 500GB hard drive.

Microsoft describes the entire process as follows:

Diskpart removes any partition or volume formatting from the focus disk. The “all” parameter specifies that each byte sector on disk is set to  zero . This completely erases all data on the data carrier .

Only MBR partitioning information and information about hidden sectors is overwritten on MBR (Master Boot Record) media . If the ALL parameter is not used, the first MB and the last MB of the storage space are set to zero. This clears all disk formatting that was previously applied to the disk. The status of the data carrier after cleaning the data carrier is ” UNINITIALIZED “.

It is really important to note that after the secure deletion of the data medium in Windows Explorer is no longer available . It must first be set up and formed as a partition again via the disk management (diskmgmt.msc) .

If you are interested in further information on the subject of data deletion , data recovery and data backup , we recommend the following articles.

– Create system repair disc / recovery DVD under Windows 10
– Work with recovery points in PowerShell
– Delete system recovery points and free up space
– Recover deleted files under Windows
– Raid defect data recovery
– Backup Exec 16 available from Veritas
– Windows 10 recycle bin (recycle.bin) from Remove desktop
– data recovery from Windows PCs
– configure shadow copies (previous versions ) and restore data

administrator