UPDATE OCT 1 2019 – Everything is still completely accurate but if you want to know how to remove all stuck partitions and recreate a volume through command line CLICK HERE.

__________________

If you install a hard disk from an old PC into your current PC, you might find a few partitions cannot be deleted.  Fortunately it is very easy and fast to use a simple command line to remove the unwanted partitions:

HOW TO REMOVE STUCK PARTITIONS:

  1. Bring up a CMD or PowerShell window (as an administrator)
  2. Type DISKPART and press enter
  3. Type LIST DISK and press enter
  4. Type SELECT DISK <n> and press enter
  5. Type LIST PARTITION and press enter
  6. Type SELECT PARTITION <n> and press enter
  7. Type DELETE PARTITION OVERRIDE and press enter
  8. Repeat steps 6 and 7 as many times as you need to remove unwanted partitions


43 Comments

Alexandru C · December 12, 2023 at 1:44 pm

This solved my stuck partition problem. Thank you very much!

Anonymous · August 28, 2023 at 7:45 pm

I real thankful to find this site, just what I was looking for to solve this problem : D also saved to fav.

Gemma · July 27, 2023 at 2:41 am

Virtual disk error:
Delete is not allowed on the current boot, system, page file, crash dump or hibernation volume

Carlos Martínez · May 24, 2023 at 8:11 am

Muchas gracias, Ian.
Funcionó perfectamente.
Había visto en otro tutorial que decía lo mismo, pero le faltaba el override al final, y no me había funcionado.
Pero agregando el override funcionó de maravillas.
Nuevamente Muchas Gracias.

Carlos.

Abhishek · February 15, 2023 at 12:06 pm

virtual disk service error, the operation is not supported by the object. The specified command or parameters are not supported by the system.
Its a primary partition.

Jr kevins · November 1, 2022 at 8:53 pm

Hello Ian I did all those cmd instructions on boot and it said no more partitions are available to be found so it clean. but after i shut down the computor and started the laptop back up it put me into automatic repair and that happaens every single time please help buddy please.

clint hughes · August 2, 2022 at 12:08 am

The clean command worked for me when the delete partition override command wouldn’t. I just selected the disk with “select disk 1” that had the partitions and typed “clean”. that wiped all info on the drive to zeros. All i had to do was go into disk management and initialize the disk.

Dustin Kleinman · July 6, 2022 at 1:38 pm

it worked out great on a old hard drive that had 8 protected partitions.

Art King · June 14, 2022 at 6:48 am

Followed the every step, did it multiple times. Partition will be deleted but after refreshing (disk management) the partition will return. Even the files that was deleted will return. Really frustrated and confused about this.

    Ian Matthews · June 15, 2022 at 9:41 pm

    Hi Art; That is odd. It sounds almost virus like (i.e. like Root Kit)

    Malaak · July 20, 2022 at 1:03 pm

    Thank you so much Mr. Ian Mathews.
    It did not work for me at first try. But it worked seamlessly after changing the disk to basic from dynamic.

    vonHelle · August 15, 2022 at 3:13 am

    I have the exact same problem. Diskpart announced everything is succesfully deleted but everything comes back after refresh. Would really like to know what’s the cause for this.

      Alun · November 25, 2022 at 2:05 pm

      I also have this exact same problem. It says the partition is deleted but it is still there and still has all of its files.

      DISKPART> list disk

      Disk ### Status Size Free Dyn Gpt
      ——– ————- ——- ——- — —
      Disk 0 Online 1863 GB 0 B
      Disk 1 Online 465 GB 0 B *
      * Disk 2 Online 59 GB 15 MB

      DISKPART> list partition

      Partition ### Type Size Offset
      ————- —————- ——- ——-
      Partition 1 Primary 59 GB 16 MB

      DISKPART> select partition 1

      Partition 1 is now the selected partition.

      DISKPART> delete partition override

      DiskPart successfully deleted the selected partition.

      DISKPART> list partition

      Partition ### Type Size Offset
      ————- —————- ——- ——-
      Partition 1 Primary 59 GB 16 MB

      DISKPART>

asdd · April 15, 2022 at 11:05 am

does not work. crap

    Ian Matthews · April 15, 2022 at 4:39 pm

    What is failing of you? What error message do you receive?

Alamin · February 20, 2022 at 5:37 am

great tutorial bro ……..

Fernando · January 2, 2022 at 3:02 pm

Thanks guys! Solved my problem with an external drive that could not use.

AA · October 6, 2021 at 2:09 am

Great tip! Thanks

István Sándor · August 29, 2021 at 12:55 pm

DISKPART> list partition

Partition ### Type Size Offset
————- —————- ——- ——-
* Partition 1 Primary 3841 MB 0 B

DISKPART> select partition 1

There is no partition selected.
—————————————————————————-
what is this message?

This is a PENDRIVE (probalbly UDF formatted…
lost NTFS partition is found, but recover not possible R/O the status of the “pendrive”

    Ian Matthews · October 5, 2021 at 4:00 pm

    Hi István;

    We are sorry for the long time lag. We have been very busy with Elections Canada (Canadian Federal Election) work. The answer seems to be that there is something wrong with PARTITION 1. You will note that it is 0B in size. I would try CLEAN command see: https://www.urtech.ca/2019/10/solved-easy-command-line-to-wipe-and-reformat-a-disk/

    To prove this, we just ran these commands against a massive 4GB USB stick and all seems to work:

    Microsoft Windows [Version 10.0.19043.1237]
    (c) Microsoft Corporation. All rights reserved.

    C:\WINDOWS\system32>diskpart

    Microsoft DiskPart version 10.0.19041.964

    Copyright (C) Microsoft Corporation.
    On computer: URTech1

    DISKPART> list disk

    Disk ### Status Size Free Dyn Gpt
    ——– ————- ——- ——- — —
    Disk 0 Online 931 GB 0 B *
    Disk 1 Online 3922 MB 256 KB

    DISKPART> select disk 1

    Disk 1 is now the selected disk.

    DISKPART> list partition

    Partition ### Type Size Offset
    ————- —————- ——- ——-
    Partition 1 Primary 3921 MB 340 KB

    DISKPART> select partition 1

    Partition 1 is now the selected partition.

    DISKPART> clean

    DiskPart succeeded in cleaning the disk.

    DISKPART> create partition primary

    DiskPart succeeded in creating the specified partition.

    DISKPART> format fs=ntfs quick

    100 percent completed

    DiskPart successfully formatted the volume.

    DISKPART> assign letter=E

    DiskPart successfully assigned the drive letter or mount point.

    DISKPART>

    Please let us know if this helped.

Joaquin · July 16, 2021 at 10:28 pm

Awesome tutorial. Quickly and easily solved my problem. You’re the bomb!

Leave a Reply

Avatar placeholder

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