Branded computers/laptops that come with Windows pre-installed usually have a hidden hardware manufacturer OEM recovery partition. This partition usually contains a manufacturer’s Windows reference image, which can be used to restore the system to factory settings (rollback/refresh), as well as a number of manufacturer’s system and diagnostic tools. The size of such an OEM recovery partition can be tens of GBs. To free up more space on the drive, advanced Windows users can delete this partition.
How to Safely Remove OEM Partition on Windows Using Diskpart?
Open the Disk Management Console (
diskmgmt.msc). In our example, the drive has a 15GB recovery partition with the volume label Recovery and the type Healty OEM Partition. If you right-click on the OEM Recovery partition in Disk Management, you will see that there is no menu items (and no option to remove the partition).
In our example, the disk has an additional recovery partition containing WinRE (Windows Recovery Environment). The winre.wim image on this partition allows you to boot Windows in recovery mode.
Check which partition contains the Windows Recovery Environment image. Run the command:
In our example, this is partition 4 on drive 0. (\\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE).
Use the built-in PowerShell Disk Management module to list the partition on the system drive:
Get-Disk | Where-Object IsSystem -eq $True|Get-Partition
In this example, you don’t need to move the recovery WIM image because it’s on a separate small 500MB recovery partition.
If the winre.wim image is on an OEM partition, we recommend you move the WinRE to the OS (Windows) partition.
Now list the Windows bootloader configuration:
Ensure that the configuration of the Windows boot manager and the Windows bootloader does not contain any references to your OEM partition.
Microsoft has intentionally restricted the functionality of the Disk Management graphical snap-in to work with the system, protected, hidden, and OEM recovery partitions. To manage such partitions, you must use third-party tools or the built-in diskpart command. In this example, we’ll show you how to remove the manufacturer’s OEM recovery partition from a drive using
Open a command prompt as an administrator, and then run the following command:
List the hard drives on the computer:
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 59 GB 5120 KB
Select the disk containing the OEM partition:
DISKPART> select disk 0
Disk 0 is now the selected disk.
List of 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.
Try to remove the partition:
DISKPART> delete partition
The following error appears:
Virtual Disk Service error: Cannot delete a protected partition without the force protection parameter set.
Diskpart cannot delete this partition. List detailed information about the selected partition and its attributes:
DISKPART> detail partition
Type : 27
As you can see, the type of partition is 27, while a common Windows NTFS partition with the standard MBR partition table uses type 07 (a hidden partition has code 17).
You may try to change the partition type as follows:
However, the easiest way to immediately delete a partition is to use the special override flag. This allows you to remove a partition of any type:
DISKPART> delete partition override
DiskPart successfully deleted the selected partition.
Now you may close the diskpart session using the command:
In this way, any OEM partition can be deleted. After deleting a partition, you can use the free unallocated space to expand other partitions or create a new one with Disk Management snap-in.
Remove Drive Letter for OEM Recovery Partition on Windows
A separate extra recovery partition (Healthy, OEM Partition) may appear on the disk with an assigned drive letter when upgrading a Windows 10 build. Only the Recovery and System Volume Information folders are on the new OEM partition.
However, this volume has insufficient free space, less than 9%. As a result, Windows 10 will start showing a constant Storage Sense notification that this disk is full and needs to be cleaned.
Run the command:
It is not recommended to remove this partition if it contains an image of the WinRE environment. You can move the WinRE image from the partition and delete it if the partition is large and you want to delete it to free up space. If small, you can simply remove the drive letter from the partition using the diskpart:
select volume <volume_number>
It is even easier to remove the mount point using the command:
mountvol E: /D
This hides the recovery partition from the user.
Or you can move the WinRE image to the C drive:
reagentc /setreimage /path C:\Windows\System32\Recovery
This will move your WInRE image to the C:\Recovery folder, and the hidden partition can be deleted.
Isn’t this dangerous though?