Recover Data Lost By Diskpart Clean – You Can Do It

According to research, laundry lists of users have had the experience of encountering low disk space. In this case, some of them choose to delete unnecessary files and programs manually, some of them choose to depend on disk defragmenter, while others take diskpart clean into consideration. It’s hard to tell which method is the best one. In fact, there’s no absolute answer for this type of question since the circumstance of users differs a lot.

Admittedly, all these methods are practical. But what we would like to talk about here is how diskpart clean works and what users could do to recover data lost by diskpart clean with MiniTool Power Data Recovery if they run it by mistake or choose the wrong disk.



About Diskpart and How to Start It in Windows

For users who intend to recover data from diskpart clean or recover data lost by diskpart format, it’s better to understand what diskpart is and what those commends could do to disk at first.

Recover data lost by diskpart clean 1

Some users have heard of or used the third-party partition manager, such as MiniTool Partition Wizard, to manage their disks & partitions. However, not all of them know the existence of the Windows built-in disk management tool – Diskpart, which could be used to accomplish almost all daily disk management operations.

The disk management operations which could be done by Windows diskpart include: creating partition, deleting partition, merging partition, extending partition, and so on. Besides, this tool is also available when we need to set dynamic disk or mirrored volume and the actions will take effect immediately; that is to say, no computer restart is needed.

To be specific, diskpart is a command execution tool running under Windows environment and it requires the supports of following system services: Logical Disk Manager Administrative Service (dmadmin), Logical Disk Manager (dmserver), Plug and Play (PlugPlay) and Remote Procedure Call (RPC) (RPCss). The dependencies of these four services are: dmserver depends on PlugPlay & RPCss and dmadmin depends on dmserver.

If those services are not running, diskpart could not be started successfully. As a result, we couldn’t run diskpart in pure DOS environment, but we can run it easily in WinPE. Now, plenty of ODM manufacturers adopt WinPE when installing operating system just because they can use diskpart to easily manage their disk.

Diskpart clean is one command you can use to delete all partitions on a disk; while diskpart format is a command to format a disk partition with certain file system. Please start diskpart.exe by using the following ways:

Recover data lost by diskpart clean 2

*) Click on the Start button -> choose “Run” to see the corresponding dialog -> type “cmd” and press “OK” -> type “diskpart” and press “Enter” in keyboard. *) Just press the Windows + R keys in the keyboard at the same time to open “Run” dialog -> type “cmd” into the textbox after “Open:” -> click “OK” to confirm -> type “diskpart” into cmd.exe -> press “Enter” key to confirm. *) Input “cmd” into the “Search programs and files” textbox after clicking on Start button -> right click on “cmd” from the result -> choose “Run as administrator” -> type “diskpart” and press “Enter” key to confirm.

*) Click on Start button -> click on “All Programs” -> open “Accessories” -> click on “Command Prompt” -> type “diskpart” and press “Enter” in keyboard to confirm.

How to Delete Partitions to Re-initialize Disk with Diskpart Tool

Now, let’s walk you through the process to clean a disk with Windows diskpart.
Step 1: open Windows Disk Management to determine the number of disk you’re going to clean partitions from, in order to prevent any error clean.

Step 2: just choose a way to start diskpart.exe as we suggested above.

Recover data lost by diskpart clean 3

Step 3: when “DISKPART>” appears in the windows, you need to type “list disk” and then press “Enter” button in keyboard. At the end of those actions, all disks in the computer or connected to the computer will be listed out in order.

Recover data lost by diskpart clean 4

Step 4: again, we’d like to emphasize the importance of choosing the exact disk you want to work with in this step. The disk number, status, size and other information are displayed at this time for you to define the correct disk. Type the command “select disk n” and press “Enter”; n stands for the number of the disk you’d like to clean.

Recover data lost by diskpart clean5

Step 5: since disk 4 is now selected in diskpart, you need to type “clean” and press “Enter” to continue. Once this action is done, you’re given no chance to regret because diskpart will delete all partitions and data from this disk permanently for you and you can’t suspend the process.

Step 6: the disk clean process only lasts for a few seconds. After that, you’ll see a prompt saying “DiskPart succeeded in cleaning the disk”. Now, you can exit the diskpart and end the disk re-initialization word.

But if you still want to check the result, you could type “list disk” again and press “Enter” to see if the free space of disk 4 equals to its capacity. Or you can just check it in the Windows Disk Management.

Now, just click the red “X” in the upper right corner to close Command Prompt window. Please remember, think twice before you use clean command to re-initialize the disk. Otherwise, you’ll be pissed off by seeking ways to recover data lost by diskpart clean. And more importantly, you may not succeed since your wrong operations may bring secondary damage to disk and make disk data unrecoverable.

Notice: if you want to clean the disk in which your operating system is running, you can only make this done in DOS.

How to Format a Drive with Diskpart Tool

If you want to format a drive to prepare it for data storage or change the file system of a drive by reformatting, of course, you can make use of the “Format” function of Disk Management or just turn to third-party disk management tool for help. But now, as you’re about to see, we’ll show you the way to format with diskpart.exe.

Step 1: if you’re not sure about the disk number and the drive letter of partition you plan to format, please check them in Windows Disk Management. Then, open diskpart in Windows to see following interface.

Step 2: at this time, cursor will be placed right after the item “DISKPART>” and you should type “list disk” and press “Enter” to see disk layout.

Recover data lost by diskpart clean 6

Step 3: now, you can type command “select disk *” (* represents the exact disk number you can see from disk layout) and press “Enter”. When this action is completed, diskpart will give you a prompt saying “Disk * is now the selected disk”.

Step 4: type “list partition” and press “Enter” to see the partition layout of the disk you selected just now. Then, diskpart will show you all the partitions in selected disk with related information, like partition type, partition size and offset.

Recover data lost by diskpart clean 7

Step 5: in this step, you’re supposed to type “select partition *” and press “Enter” to select the partition you want to format (also, * represents the exact partition number). As you can imagine, “Partition * is now the selected partition” will appear.

Recover data lost by diskpart clean 8

Step 6: at last, type “format” and press “Enter” again. And you’ll see the completed percent is changing automatically. When the percent becomes 100, another prompt will appear to inform you that the format process is done: DiskPart successfully formatted the volume.

Now, you can click the red “X” in the upper right corner of Command Prompt window to close it or just type “exit” and press “Enter” to leave diskpart. Since format will remove all your data from the certain partition, you also need to consider seriously before actually formatting the operation.

Yet, it does not mean that users have no chance to recover partition after diskpart clean or diskpart format. Later in this article, we’ll introduce a piece of renowned data recovery software for Windows and the corresponding solutions to recover data lost by diskpart clean and diskpart format. But remember, please don’t save any data to the disk/partition you’ve planned to recover data from. Otherwise, data overwriting will be caused and lead to permanent data loss.

Recover data lost by diskpart clean 9

By the way, here’s how you can format a drive with Disk Management: click on Start button to see the Start Menu -> choose “Computer” and right click on it to see submenu -> select “Manage” -> choose “Disk Management” under “Storage” option which is listed in the left panel of “Computer Management” window.

Now, right click on the disk partition you’d like to format -> choose “Format” -> set “Volume label”, “File system” and “Allocation unit size” in Format window according to needs -> click on “OK” to confirm.

Recover data lost by diskpart clean 10

And this is how you can format with third-party tool – MiniTool Partition Wizard:
double click Partition Wizard icon and choose “Launch Application” from the welcome page -> select the target partition -> click “Format Partition” under “Operations” -> set “Partition Label”, “File System” and “Cluster Size” if you need (you can also keep them unchanged) -> press “OK” button to confirm -> tap “Apply” button from upper left corner and choose “Yes” from pop-up window to execute.

How to Recover Data Lost by Diskpart Clean

In the case where diskpart clean command is performed to a disk, all partitions and data are deleted permanently. So if users run the diskpart clean command on the wrong disk, they are suggested to make use of the “Lost Partition Recovery” module of MiniTool Power Data Recovery to recover data from diskpart clean.



First of all, open MiniTool Power Data Recovery to see the main interface, in which 5 different functional modules are displayed. Then, click on “Lost Partition Recovery” to start.

Recover data lost by diskpart clean 11

Secondly, select the disk which is cleaned by diskpart and press “Full Scan” button in the lower right corner to start a full scan. (If the cleaned disk is a removable disk, please connect it to computer now and press “Refresh” button in lower left corner to refresh the disk list)

Thirdly, when the full scan is over, all possible partitions and data that could be found in this selected disk will be displayed in this data recovery software for Windows. And now, just look through them, and check all the needed files & folders to recover by pressing “Save” and choosing another disk as the storage location.

After all files & folders are saved to the appointed disk, users can go there to check. And then, they can close the software and put an end to data recovery after diskpart clean.

How to Recover Data Lost by Diskpart Format

Well, in the case where diskpart format is performed and completed on a wrong partition, all data (valuable ones and unnecessary ones) will disappear. Under this circumstance, users are expected to activate “Damaged Partition Recovery” module to try to recover data from diskpart format completely.

First of all, users also need to open MiniTool Power Data Recovery and choose “Damaged Partition Recovery” by clicking on it.

Secondly, they should select the partition which is formatted by diskpart and press “Full Scan” to start to detect files and folders in it.

Thirdly, at the end of full scan, you ought to look through the found data carefully to pick out all needed ones. And at last, save them out to another drive by tapping “Save”.

Recover data lost by diskpart clean 12

By the way, if your system is crashed, please resort to the bootable edition of MiniTool Power Data Recovery to access damaged disk without OS. The usage of this edition is similar to free edition and other editions. Only the “CD/DVD Recovery” module won’t appear in the main interface.

No matter you want to recover lost disk or partition in Windows 7, or other systems, MiniTool Power Data Recovery could be your best assistant. If you doubt this, you may as well try the free edition first to experience its power and then you can decide whether you’d like to buy a license or just use the free edition to recover data in the future.

Common problems related to partition recovery and our solutions: