Posted on October 24, 2017 · Posted in Windows 10, Windows 7

How to Delete OEM Recovery Partition Using Diskpart

Most desktop or laptop manufacturers create a separate recovery partition on hard drives of their branded OEM systems to store a reference system image (you can roll back to it, when doing factory reset) and a number of system and diagnostic tools provided by the manufacturer. The size of the partition can be up to several tens of gigabytes. In some cases, it is worth to remove such an OEM/EISA partition and increase the system partition .

It is convenient to create/delete partitions using Disk Management (diskmgmt.msc) snap-in. In this example, the 15 GB recovery partition has volume label Recovery and type OEM Partition. If you right-click the OEM Recovery partition in Disk Management, you can see that there is no disk menu (and the option to remove the partition as well).

oem recovery partition in disk managment console

Microsoft has deliberately restricted Disk Management functionality to work with  system, protected, hidden or OEM recovery partitions. To deal with these types of partitions, you have to use third-party tools or the integrated utility diskpart. In this example we’ll show how to delete an OEM recovery partition from your hard drive using diskpart.

Important! Prior to deleting an OEM/EISA recovery partitions, you must clearly understand that you won’t be able to roll back your system to factory state. Also, there may be drivers, manufacturer system tools, configuration files used by your firmware during the boot, etc. In some cases, it’s better to look for the official guidelines or utilities to create a recovery CD/DVD on the manufacturer website to safely delete or move an OEM partition. (I’ve come across this kind of guideline for Lenovo ThinkPad that allowed to change BIOS/UEFI settings.) And don’t forget that in UEFI systems, you must not delete the EFI System Partition (ESP) containing the loader (how to recover deleted EFI partitions).

Start the command prompt with the administrator privileges and run the following command:


Display the list of the disks in the system:

DISKPART> list disk
Disk ###  Status         Size     Free     Dyn  Gpt
--------  -------------  -------  -------  ---  ---
Disk 0    Online          59 GB      5120 KB

Tip. If you don’t see the disk you need, scan the system again using rescan command.

Select the disk containing the partition you need:

DISKPART> select disk 0

Disk 0 is now the selected disk.

Tip. You must specify the correct disk number here. As a rule, on a computer with one hard drive you have to select the disk with 0 index.

Display the list of available partitions on the selected disk:

DISKPART> list partition

Partition ###  Type              Size     Offset
-------------  ----------------  -------  -------
Partition 1    Recovery          400 MB  1024 KB
Partition 2    System (EFI)      260 MB   401 MB
Partition 3    Reserved          128 MB   661 MB
Partition 4    Primary            43 GB   789 MB
Partition 5    Recovery          495 MB    43 GB
Partition 6    Primary            15 GB    44 GB

Then select the partition you want to delete:

DISKPART> select partition 6

Partition 6 is now the selected partition.

Tip. Here, you have to specify the number of the partition you are going to delete. You must be very attentive when selecting the partition not to delete the data or system partition.

Let’s try to delete this partition:

DISKPART> delete partition

The following error appears:

Virtual Disk Service error:
Cannot delete a protected partition without the force protection parameter set.

diskpart error : Cannot delete a protected partition

I. e., diskpart cannot delete this partition.

Display the detailed information about the selected partition:

DISKPART> detail partition

Partition 6
Type : 27
Hidden: Yes
Active: Yes

As you can see, the type of the partition is set to 27, while common Windows NT NTFS partition with the standard MBR partition table uses type 07 (a hidden partition has the code 17).

You may try to change the partition type as follows:

DISKPART>setid id=07

However, it’s easier to delete the partition using override flag, that enables any partition type to be deleted:

DISKPART> delete partition override

DiskPart successfully deleted the selected partition.

Tip. You won’t be able to delete a system or boot partition, or any other partition containing the active swap file or memory crash dump.

Now you may close the diskpart session using commandexit

Using this method, you can delete any OEM or EFI partition. After it is deleted, the free space may be used to enlarge the existing partition or create a new one in Disk Management.

Related Articles