Can’t Remove a Partition? Use DiskPart

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

  1. Use the search function in the start menu and find Command Prompt.
  2. Right click and choose Run as Administrator

Windows 8

  1. 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
  2. Right click and choose Run as Administrator

diskpart-deletep (1)

diskpart-deletep (2)

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]

diskpart-deletep (3)

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]

diskpart-deletep (4)

To view the partitions on the drive, enter the command below and press Enter

[php]list partition[/php]

diskpart-deletep (7)

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]

diskpart-deletep (5)

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]

diskpart-deletep (6)

Repeat for all partitions you can’t remove using Disk Management and you are done.  Enjoy!

About Joe D

I have always had a passion for everything computing. In early 2000, I decided to take my passion to the web. Thus, C.O.D. was born. Through the years we have made many great friends at C.O.D. and hope to continue our journey for years to come.

Check Also

Fix Could not find file During Set up Client Restore Service Setup

While conducting the overview of Windows Storage Server 2012 R2 Essentials, I ran into a few errors while configuring the "Set up Client Restore Service". It seems that no matter what I did, I couldn't get the service to start. Then, a little digging, a quick copy & paste; all was resolved.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.