Home | Articles | Microsoft | Windows 7 | Can’t Remove a Partition? Use DiskPart

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

DiskPart

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.

list disk

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

select disk 0

diskpart-deletep (4)

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

list partition

diskpart-deletep (7)

Choose your stubborn partition(s) by entering the command below and pressing Enter.  For our purposes here, it is partition 1.

select partition 1

diskpart-deletep (5)

Deleting the partition is as simple as entering the command below.

delete partition override

You should be prompted with:

DiskPart successfully deleted the selected partition.

diskpart-deletep (6)

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

About Joe DiFiglia

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

Where is the Startup Folder in Windows 8.1?

Ok, we all know that a lot of things have changed in Windows 8 and …

Leave a Reply

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