Skip to content

Using Diskpart to Manage Partitions

Published: at 05:02 AM

Diskpart is a powerful command-line utility in Windows that allows users to manage disk partitions, including creating, deleting, and formatting partitions. This tutorial explains how to use Diskpart to delete recovery or EFI system partitions that are otherwise inaccessible through the standard Disk Management tool.

Steps to Delete Partitions Using Diskpart

  1. Open Command Prompt as Administrator

    • Press Win + X and select Command Prompt (Admin) or Windows Terminal (Admin).
  2. Launch Diskpart

    • Type Diskpart and press Enter to open the Diskpart utility.
  3. Rescan Partitions and Drives

    • At the Diskpart prompt, type:
      rescan
      
      • This command refreshes and lists all available disks and partitions.
  4. List Available Disks

    • To view all hard disks, type:
      list disk
      
      • Each disk will be labeled (e.g., Disk 0, Disk 1, etc.).
  5. Select a Disk

    • Identify the disk containing the partition you want to delete and type:
      select disk 0
      
      Replace 0 with the appropriate disk number.
  6. List Partitions in the Selected Disk

    • Type:
      list partition
      
      • This shows all partitions on the selected disk.
  7. Select the Partition to Delete

    • Type:
      select partition x
      
      Replace x with the number of the partition to be removed.
  8. Delete the Partition

    • Type:
      delete partition override
      
      • The override flag ensures the deletion of protected partitions, such as recovery or EFI partitions.

Exiting Diskpart:

Once you’ve finished managing your disks and partitions, type exit and press Enter to exit the Diskpart application and return to the Command Prompt.

Deleting a Partition (Use with Caution):

Warning: Deleting a partition permanently removes all data stored on it. Only proceed if you’re absolutely sure and have a backup of any important data.

Assuming you’ve carefully identified the partition for deletion, type the delete partition override command and press Enter. This will permanently delete the selected partition and reclaim the unallocated space.

Important Notes

Related Resource

For further details, refer to the discussion on TechNet Forums.

With Diskpart, managing partitions becomes a straightforward process, even for those typically locked or hidden.


Previous Post
Synchronizing Databases in MSSQL
Next Post
Facebook Script to Click on All Loaded Like Buttons