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:
Bring up a CMD or PowerShell window (as an administrator)
Type DISKPART and press enter
Type LIST DISK and press enter
Type SELECT DISK <n> and press enter
Type LIST PARTITION and press enter
Type SELECT PARTITION <n> and press enter
Type DELETE PARTITION OVERRIDE and press enter
Repeat steps 6 and 7 as many times as you need to remove unwanted partitions
What is failing of you? What error message do you receive?
great tutorial bro ........
Thanks Alamin!
Thanks guys! Solved my problem with an external drive that could not use.
Great tip! Thanks
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"
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 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.
Awesome tutorial. Quickly and easily solved my problem. You're the bomb!
Thanks Joaquin
LOL HOW CAN U SUPPOSED TO DELETE THE SPECIFIC PARTITION?
diskpart
list disk
select disk #
list partiton
select partition #
delete partition
if error of protected partition
delete partition override
Thanks Justin
Hi Danieru;
I am unsure of your question. If you can restate it, we will do our best to answer it.
Thanks.
Thank you,, I was stuck trying to get rid of protected space , used power shell worked fine glad i tried this and you were the only one i found who understood my problem thanks again Tim !!
followed the steps, encountered the error that said cannot be deleted, then i followed his instructions on turning off hibernation and file paging, then it works. thanks a lot. thank you so much
Typing "DELETE PARTITION OVERRIDE" didn't work for me. Instead select the disc you wan't to clean and type "CLEAN"
View Comments
does not work. crap
What is failing of you? What error message do you receive?
great tutorial bro ........
Thanks Alamin!
Thanks guys! Solved my problem with an external drive that could not use.
Great tip! Thanks
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"
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.
Awesome tutorial. Quickly and easily solved my problem. You're the bomb!
Thanks Joaquin
LOL HOW CAN U SUPPOSED TO DELETE THE SPECIFIC PARTITION?
diskpart
list disk
select disk #
list partiton
select partition #
delete partition
if error of protected partition
delete partition override
Thanks Justin
Hi Danieru;
I am unsure of your question. If you can restate it, we will do our best to answer it.
Thanks.
Thank you,, I was stuck trying to get rid of protected space , used power shell worked fine glad i tried this and you were the only one i found who understood my problem thanks again Tim !!
followed the steps, encountered the error that said cannot be deleted, then i followed his instructions on turning off hibernation and file paging, then it works. thanks a lot. thank you so much
Typing "DELETE PARTITION OVERRIDE" didn't work for me. Instead select the disc you wan't to clean and type "CLEAN"