How to Recover Deleted Partition Using CMD Efficiently?

How to recover deleted partition using CMD? The diskpart recovery command comes here to help you. Also, there is an easier way - using partition recovery software.


By Penny / Updated on May 11, 2024

Share this: instagram reddit

Video Guide: How to recover deleted partition using CMD

Sometimes, if you cannot access your desired partition in Windows File Explorer, you can use Disk Management to view it because this tool is designed to perform advanced storage tasks in Windows.

Perhaps you can find your partition in the unallocated space. This means that your partition has been deleted. Then, how to recover deleted partition using cmd? If you are experiencing this issue, read on to learn more.


Can Diskpart deleted partitions be recovered?


Hello! I deleted my HDD partition through the command prompt with diskpart. But nowadays, I want to get it back. Is it possible for me to recover the deleted partition? Any help will be appreciated. Thanks.

- A user from Tomshardware

Yes, you can recover partition deleted by DiskPart command and this article will show you two effective methods i.e. recover deleted partitions Windows 10 using CMD and partition recovery software - AOMEI Partition Assistant.

In general, the system only remove partition information, such as partition type, size, file system, etc. from partition when you delete a partition. To be sure your partition is recoverable, please don't do the following things: 

  • Stop using your storage devices as quickly as you.
  • Do not write new data on the partition.
  • Do not reformat the hard drive.
  • Do not rebuild the partition table.
What does a partition mean?

Disk partitioning (Disk slicing) refers to creatingone or more regions on secondary storage. After that, each region can be managed separately. These regions are what we normally call partitions.

How to recover deleted partition in Windows 10 using CMD 

In the first part, we will use the diskpart to restore partition in Windows 10. Follow the steps below and learn how to recover deleted partition:

Step 1. Press the “Windows + R” keys to open the Run window. Then enter “diskmgmt.msc” and click “OK” to open Disk Management.

Step 2. Locate your deleted/lost partition and remember its size. Then the deleted partition space will be marked as unallocated space.

Step 3. Enter “cmd” in the search bar and select the “Run as Administrator” option to open the command prompt window. 

Step 4. Type “diskpart” in the window and press “Enter”.

Step 5. Type “list disk” and press “Enter”. Then you can see all the partitions on the computer.

Step 6. Type “select disk a” and press “Enter” (a means the number of the hard drive including the lost partition).

Step 7. Type “list volume” and press “Enter”.

Step 8. Type “select volume b” and press “Enter” (b means the number of the lost partition). Type “assign letter c” and press “Enter” (c means a drive letter that can be used).


📢 How to recover lost partition on external hard drive using cmd?
  • connect your external hard drive to a Windows 10 or other computers and be sure it's detected in the Disk Management tool.

  • check the size of deleted partition on external hard disk.

  • Type diskpart recovery command above to recover unallocated space in Windows 10. 

How to recover deleted partition via partition recovery software

In this scenario, we’d like to share another troubleshooting software, AOMEI Partition Recovery Wizard.

Under the guidance of an intuitive graphical user interface and easy-to-following steps, everyone can recover the deleted/lost partitions from HDD, SSD, USB, and SD card.

Built-in AOMEI Partition Assistant Professional, you can also retrieve the data saved in the restored partitions before data coverage. And it supports NTFS, FAT, and Ext2/Ext3/Ext4 partition recovery.   

As a disk manager, it can help you resize, move, merge, and split partitions without losing data. As you can see, it can save you from improper partition resizing. 
As a multifunction converter, it allows you to execute disk conversions between MBR and GPT/basic disk and dynamic disk/NTFS and FAT32.

Please download and try out its demo version. These steps depict how to recover deleted partitions using it.

Download Demo Win 11/10/8.1/8/7/XP
Secure Download

Step 1. Download and install it on your PC. Then launch it. Click “Partition Recovery” > select the disk that includes your deleted/lost partition > click “Next”.

Parition Recovery Wizard

Step 2. Select “Fast Search” to find your deleted/lost partition quickly. Then click “Next”.

Search Method

Step 3. After scanning, you can see all the deleted/lost partitions on the hard disk. Then you can select the partition you want to restore and click “Proceed”.

Select Lost Partition

Step 4. After the recovery process, you’ll see a “Congratulations” message. (You could pay attention to the helpful notes in the reference pic.) Then click “Finish” to exit.


In conclusion 

How to recover deleted partition using CMD? Please refer to the traditional solution. Besides, AOMEI Partition Recovery Wizard can help you simplify your computer disk partition management and make it safer without losing data. 

To prevent data loss, it's time for you to make automatic, full, incremental, or differential backups via free backup software for Windows, AOMEI Backupper. This tool also gives full coverage to sync and clone. 


Is it possible to recover a deleted partition using Command Prompt (cmd)?

Yes, it's possible to recover a deleted partition using Command Prompt (cmd) on Windows systems. Command-line tools like Diskpart can help in certain scenarios where a partition has been accidentally deleted or lost.

How can I access Diskpart in Command Prompt to recover a deleted partition?

To access Diskpart in Command Prompt, open Command Prompt with administrative privileges, type "diskpart" and press Enter. This command launches the Diskpart utility, which allows you to manage disks, partitions, and volumes.

What commands can I use in Diskpart to recover a deleted partition?

Within Diskpart, you can use commands such as "list disk" to display all available disks, "select disk X" (where X is the number of the disk containing the deleted partition), "list partition" to display all partitions on the selected disk, and "recover partition" to attempt to recover the deleted partition.

Can I recover a deleted partition without using third-party software?

Yes, you can attempt to recover a deleted partition using built-in Windows tools like Diskpart and TestDisk without relying on third-party software. These tools provide command-line and graphical interfaces for partition recovery.

Are there any risks involved in using Diskpart to recover a deleted partition?

Yes, there are risks involved in using Diskpart to recover a deleted partition, such as potential data loss or damage to other partitions if not used correctly. It's essential to follow instructions carefully, back up important data before attempting recovery, and consider seeking professional assistance if unsure.

Penny · Editor
Penny works as an editor at AOMEI Technology, while she's a tester and editor for AOMEI Data Recovery Tools. She enjoys helping users with data recovery issues on Windows and iPhones using simple and practical solutions. Outside of work, she has a strong affection for pets, particularly giant pandas.