In any kind of hard drive, there are the partitions to operate as per their requirement in computing by user and by machine itself. These partitions are usually known as hard disk drives. Actually, you can create partitions or hard disk drives as you like. But, there are some standard partitioning-patterns defined by giant firms based upon available firmwares. There are four types of firmwares present these days:
- Basic Input/Output System (BIOS)
- Extensible Firmware Interface (EFI) (Class 1)
- Unified Extensible Firmware Interface (UEFI) (Class 2), and
- Unified Extensible Firmware Interface (UEFI) (Class 3)
Each firmware of the computer have its unique disk-partitioning-pattern type that must be matched. These partitioning-pattern are standard and reliable for computer and so for user.
Well! That is the bonus knowledge you got. As the title suggests, you can delete any disk partition or hard disk drive in Command-line interface (CLI) basically which you call it Command Prompt or cmd.exe in Windows. You can do it easily with some patience and care. Since there are some partitions that can’t be delete or create by disk manager (i.e. Disk Management), you can delete them also through Command Prompt easily. There are many third-party softwares called as ‘partition assistants‘ from the developers like AOMEI, EaseUS, MiniTool, and many more available on the web-market. After installation, these softwares can make your work easy—you can do many operations on your hard drive through these, major of them are like creating, merging, moving, deleting. I’m not going to that much details of them.
So, here I am going to show you how to do it, on one of my computers. Just because of rare corruption I deleted a OEM recovery partition of 26.33 GB of that computer, that was located in Disk 0 as a primary Partition 6. This recovery partition can’t be deleted in Disk Management.
You can follow these steps:
Follow these steps precisely as you could affect any other required disk partition mistakenly.
[STEP 1] Open Command Prompt as an administrator.
Type “Command Prompt” or “cmd” in Windows Start Search and then right-click on Command Prompt to run as administrator.
Or, if you are using Windows 10 then just right-click on Start button or press Windows key+X to open “Command Prompt (Admin)“.
You will get Command-line interface screen titled as “Administrator: Command Prompt“.
NOTE: As Command-line interface don’t understand the case sensitivity, you can type in any case. After every command you typed, you have to press Enter key for its execution.
[STEP 2] There you have to type “diskpart” and press Enter. By doing this you got the access to DiskPart of your computer.
You will get something like this with your computer’s name.
[STEP 3] Then type “list disk” and press Enter. By doing this you will get the list of hard disks associated with your computer. See image.
[STEP 4] Select the preferred hard disk that contains hard disk drive that you want to delete. For this, type “select disk #” and press Enter—here # is denoting the serial number of disk you want to select. After pressing Enter, the line “Disk # is now the selected disk.” will appear along with a * sign in last column of that selected disk for confirmation. By default that * sign appears with first disk as you can see in Step ‘s image. See image.
[STEP 5] After selecting the disk properly. Type “list partition” and press Enter. This action let you see all the hard disk partitions holding by that selected hard disk. See image.
[STEP 6] Similarly as disk selection, now you have to select hard disk partition which you want to delete. Carefully identify the partition before typing command—double-check the Size and Offset columns with My Computer/This PC explorer. Then type “select partition #” and press Enter—here # sign denoting the serial number of partition you want to select. A confirmation line will appear. See image.
[STEP 7] After selecting preferred partition. Now, its time to delete that partition. For this, type “delete partition override” and press Enter. A confirmation line “DiskPart successfully deleted the selected partition.” will appear. See image.
For your confirmation, you can immediately check My Computer/This PC explorer, Disk Management and even you can type “list partition” again just after confirmation line. There you will see that selected partition had gone. See images.
[STEP 8] Now, to exit from DiskPart, type “exit” there and press Enter. After that you also have to exit from Command Prompt, type “exit” there again to close that.
That’s it. You are done!
Now, you can use this unallocated size as you want. You can assign a new primary partition or merge it into boundary partition/drive through Disk Management.
Even you can do it after [STEP 7] in same Command Prompt window by using “assign” and “merge” command lines.
If you are facing any problem related to hard drive partitioning, feel free to use comment box below.