Cry How To...

How to delete an OEM partition

Normally you can delete a partition using Disk Management.

Start → Control Panel → Administrative Tools → Computer Management → Storage → Disk Management

This allows you to view all the disks connected to your computer and the partitions on those disks. Normally you can simply right click on a partition and select "Delete volume" to remove a disk partition. But if the partition is an OEM partition or if it is some other type of partition that Windows does not recognise then it will not let you delete the partition. Frustrating to say the least if you want to delete a partition in order to say reformat the drive.

Fortunatly a work around is available, using the comand line utility "diskpart".

  1. Possibly the easiest way to run this is "Windows key" + "R", which will open run a "Run" dialog, enter "diskpart" (without the quotes) and click [OK]. Windows User Account Control may ask you to confirm that you want to run this, select yes.

    You should now see a new window similar to the following:

    Microsoft DiskPart version 6.2.9200

    Copyright (C) 1999-2012 Microsoft Corporation.
    On computer: DEV6


    The version number, copyright years and computer name may be different for you.

  2. Now you need to identify which disk you need to work with. Type the command:

    list disk

    and this will list all the drives connected to your computer, eg:

    DISKPART> list disk


      Disk ###  Status     Size     Free     Dyn  Gpt

      --------  ---------  -------  -------  ---  ---

      Disk 0    Online      931 GB      0 B

      Disk 1    Online     1863 GB      0 B

      Disk 2    Online     4092 MB      0 B

      Disk 3    No Media       0 B      0 B

      Disk 4    No Media       0 B      0 B

      Disk 5    Online      232 GB   127 MB       *



    In my case it is disk 5 that I wanted to wipe and reformat. If you are not sure which disk you want then Disk Management uses the same drive numbers.

  3. To select the disk enter the command:

    select disk 5

    Substituting the correct drive on your system. It was disk 5 for me, but it will most likely be a different disk number for you. Be very confident that you are selecting the correct drive - you don't want to end up deleting the partition that has Windows on it.

    DISKPART> select disk 5


    Disk 5 is now the selected disk.



  4. To see the partitions on that drive use:

    list partition


    DISKPART> list partition


      Partition ###  Type    Size     Offset

      -------------  ------  -------  -------

      Partition 1    System   200 MB     20KB 

      Partition 2    Unknown  232 GB    200MB

      Partition 3    OEM      127 MB    232GB 



    Probably it will be the "OEM" partition that you will want to delete. In my case it was the "OEM partition" and the "Unknown" partition.

  5. To delete a partition first identify the number of the partition, then you have to select it and only then can you delete it.

    To select a partition use:

    select partition 3

    where "3" is for me the number of the partition I wanted to delete but it may well be a different partition number for you.

    and to delete the selected partition use:

    delete partition


    DISKPART> select partition 3


    Partition 3 is now the selected partition.


    DISKPART> delete partition


    DiskPart successfully deleted the selected partition

    If you need to delete any further partitions then select the partition and then delete it. In this case I also wanted to delete partitions 1 and 2 so I could create a new single partition spanning the entire drive, ie:

    DISPART> select partition 1


    Partition 1 is now the selected partition.


    DISKPART> delete partition


    Virtual Disk Service error:

    Cannot delete a protected partition without the force protection parameter set.



    Not to worry, this is a warning from Windows that you need to be doubly sure that you want to delete this partition. If you see this error when trying to delete a partition then use:

    delete partition override


    DISKPART> delete partition override


    DiskPart successfully deleted the selected partition.



    and now that you have finished you can quit diskpart by simjply typing exit.

These notes have been tested with Windows Windows 8, Windows 2012 server and Windows 7.

About the author: is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.