In this post, we will describe how to delete a partition from command line. It is necessary when you are not able to do it from Disk Management (GUI). Let’s not delay and start.
Step 1: Run Command Prompt as Administrator: Click Start Menu/Search Box, type Command Prompt. Right-click on Command Prompt App and Click Run as administrator.

Step 2: Enter Disk management Utility: Type diskpart and Hit Enter

Step 3: Show available Disks: Type list disk and Hit Enter. [in this case only one disk is available]

Step 4: Select the desired disk: Type select disk 0 and Hit Enter. [will modify partitions from Disk 0]

Step 5: Show Available Partitions: type list partition and Hit Enter. [partitions are listed]

Step 6: Select Desired Partition: Type select partition 6 and Hit Enter. [will modify partitions 6]

Step 7: Delete the Selected Partition: Type delete partition override and Hit Enter.

Step 8: Verify that Partition is deleted: Repeat Step 5.

You can see the partition 6 is no more available here.