Recovering Data After Using the Clean Command in Diskpart
Tags: beginners, testing, test, tutorial
Published: 2022-04-18 06:24:17

Read this article to find out how to recover data lost after cleaning a hard disk, USB stick or a memory card with the Clean command in Diskpart.

## Cleaning the Disk with the Help of DISKPART → CLEAN
Cleaning a hard disk and its partitions with the Diskpart tool and the command Clean is one of the ways to recover a memory card, a USB stick or a hard disk if they don’t work properly, terrorize you with failures or show the wrong memory size. This command is also used to unlock a write-protected USB drive, memory card or hard disk in Windows 10, 8 or 7.

Use the command Clean in Diskpart to remove partitions which cannot be deleted with other integrated tools such as Disk Management. This command launches the process to completely remove the disk partition table so that you can create it from the scratch.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1g0ws9w405j81t41v1v.png)

## Loss of Data as a Result of Using DISKPART → CLEAN
Yet sometimes when you use this system tool, things may go wrong. For example, you can select the wrong disk or partition and delete it by mistake.

As a result, you will get a clean disk without any file system.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tc7w5p28uz92ad43hakx.png)

To make things even worse, only a few data recovery apps can restore the information lost this way.

## How to Recover Data Lost After Applying the Command DISKPART → CLEAN?
So what can be done if you cleaned the disk with the Clean command, or tried to use this command to recover a disk, USB stick or memory card which are blocked or cannot be formatted?

We are going to use Hetman Partition Recovery to get the lost files back, and soon you will see why.
Start the program, and you will see all disks connected to this computer.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n621t92nelddi8hrxmiu.png)

The disk we have cleaned is a 16 GB USB drive. It could be any other memory device – the type doesn’t matter.

Find it among other drives detected by the program and try analyzing it.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/idfurn9kz996ds2jn03w.png)
Select Fast scan and here is what you get. The program cannot analyze the USB drive because it doesn’t have any file system. This is exactly what you are going to face when you use most data recovery tools trying to analyze a disk after the Clean command.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cewhap24iba3pt1zrios.png)
In order to recover data, you need to analyze the USB drive as a physical device rather than its file system. As a result, the program will try to detect any file systems that previously existed on this USB drive, and the data that it used to store. To do it, select the USB drive from the Physical Disks list.
Scan it using Full Analysis. The time required to analyze your drive depends on its size. Wait until the analysis is complete.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/exwlj1l232kdjkjmbgcu.png)

As a result, here’s what you see. The program detected several partitions in the cleaned USB drive. These are partitions and file systems that used to exist on this flash drive. For some of them, the utility was even able to restore the names.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6g5uvkaigk5ztzhsh9l7.png)

Now find the lost partition you need. Click on it.
In fact, that’s all. All the files lost after cleaning the drive with the Clean command are now displayed. The ones marked with the red cross next to them are the files which had been already removed at the time of cleaning the drive.

Find the files you want to recover. You can use the preview window to see their contents.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w26wninmzrcza1m7j3wk.png)

Drag them to the recovery list and click the Recovery button.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5s03h9qtnuhdbxm5ltgg.png)

Choose the method and folder for recovery.
All files have been recovered.