Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

error
disk partitioning
partitions

DiskPart error when deleting system-protected partitions

Anusheh Zohair Mustafeez

DiskPart is a disk partitioning command-line utility that is compatible with all recent versions of Windows. DiskPart is often used to remove disk partitions; however, when you try to delete hidden or system protected partitions using the delete partition command, the following error shows up:

Cannot delete a protected partition without the force protected parameter set

DiskPart throws this error as a warning to confirm that the user knows they are attempting to delete a recovery partition. To overcome this issue, one can use the override parameter to inform Windows that they do intend to delete hidden partitions. We will cover how to do so in this shot.

svg viewer

Solution

Follow the steps below to resolve the error:

  1. Press the Windows key and the “R” key together to open up a Run dialog box. Type “diskpart” into the box and click the “OK” button. Allow DiskPart to make changes to your device in response to the User Account Control prompt.
widget
  1. Enter list disk into the DiskPart command line that has opened up. Doing so will display a list of disks connected to your device.
widget
  1. Next, we will select a disk from those listed by the previous command using the select disk X command where X is the number of the disk we want to select.
widget
  1. Then, we will enter the list partition to view the partitions available of the selected disk.
widget
  1. Now, we will select a partition the same way we selected a disk using the select partition X command, where X is the partition we wish to delete.
widget
  1. To delete the selected partition, we will use the delete partition override.
widget
  1. Finally, we can exit the DiskPart command line with the exit command.

RELATED TAGS

error
disk partitioning
partitions

CONTRIBUTOR

Anusheh Zohair Mustafeez
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring