If you have ever removed a hard drive from a system and installed it in another, you may have run into a situation before where you are unable to delete some of the partitions on the drive. This usually happens when you remove the hard drive from a system made by Dell, Acer, Samsung, etc. The partitions you are unable to remove are usually designated for system restore and the like. Well, getting rid of those partitions is easier than you think. All you need is a command line and a cup of coffee, coffee optional.
The partition is the problem, DiskPart is the solution. DiskPart is a command line utility integrated into Windows that allows you to manage disks, partitions, or volumes. We could spend a day on all the things you can accomplish with DiskPart, but we are just going to focus on removing those stubborn partitions.
First, you will need to open a command prompt as administrator.
Windows 7
- Use the search function in the start menu and find Command Prompt.
- Right click and choose Run as Administrator
Windows 8
- From the Metro UI or the Modern UI (Microsoft ditched the term Metro and replaced it with Modern) search for the Command Prompt by simply typing Command Prompt
- Right click and choose Run as Administrator
With the command prompt open start DiskPart, enter the command below and press Enter
[php]DiskPart[/php]You should notice that you no longer see C:\Windows\…, instead you now see DISKPART>
To choose the disk you want to remove the partitions from you need to figure out what disk number it is from the system view, enter the command below and press Enter.
[php]list disk[/php]We know that our primary SSD in this system is 256GB and is assigned as Disk 1, so the other disk is the one we want. To choose that disk, enter the command below and press Enter
[php]select disk 0[/php]To view the partitions on the drive, enter the command below and press Enter
[php]list partition[/php]Choose your stubborn partition(s) by entering the command below and pressing Enter. For our purposes here, it is partition 1.
[php]select partition 1[/php]Deleting the partition is as simple as entering the command below.
[php]delete partition override[/php]You should be prompted with:
[php]DiskPart successfully deleted the selected partition.[/php]Repeat for all partitions you can’t remove using Disk Management and you are done. Enjoy!