Force DISKPART to delete EFI system partition in Windows 11 and 10



So you've upgraded your Windows laptop by replacing its old mechanical spinning disk hard drive with a fast SSD. Congratulations, your laptop is much faster now. What to do with the old drive though? Sure it's not fast, but it probably still has a few years of useful life in it, wouldn't it be nice to repurpose it for use as a backup drive? So you are going ahead and trying to erase the old data from it, but you encounter a problem: Windows refuses to remove the old EFI system partition External link that used to have Windows boot files on it. Sound familiar? This article should explain how to delete the EFI partition and erase the whole hard drive properly.

Windows offers a built-in tool for working with storage devices, Disk Management. You can run it by right-clicking on Windows 11/10 Start button and choosing Disk Management from the popup menu:

You can open Disk Management tool by right-clicking on the Start button.

(If you use an older version of Windows such as Windows 7, you can get to this tool by right-clicking the My Computer item on Start menu and choosing Manage from the popup menu.)

If you used this tool before, you probably know that its screen is split horizontally. The top half lists volumes and their respective drive letters, while the bottom half contains a list of the storage devices currently attached to the computer and available for use by Windows. If the old hard drive that you want to erase is connected to the computer, you should find it in the bottom part of the screen.

(Note that if you've just cloned the old hard drive to the SSD and both are attached, then Windows may keep one of them offline. If this happens to you, simply force Windows to bring the hard drive online.)

Disk Management of Windows 10 lists all available storage devices

Now back to erasing the old hard drive. First of all, make sure you recognize the drive you want to erase in the list: you don't want to accidentally erase a wrong drive. Scroll through the list in the bottom part of the Disk Management window and make sure you can identify each disk listed there: which one is the primary boot drive (usually it's the first one), which one is the CD/DVD drive, and which one represents the drive you want to erase. If in doubt, disconnect the drive from the computer and refresh the list, notice which entry would disappear. Now attach the drive back to the computer and see its entry reappearing back in the list. If you are confident which entry represents the drive you want to erase, go on.

Take a note of the disk number that Windows assigned to the hard drive you want to work with. In our example above, the disk number is 2. We will need it later on.

To remove old information from the drive, use Disk Management to delete the partitions this drive contains. Right-click each partition and choose Delete Volume from the menu:

Use Disk Management right-click menu to delete partitions

This should work on most partitions, but if the hard drive was previously used for a Windows installation, then it may contain one or two system partitions that cannot be deleted this way: when you right-click on such a partition, the popup menu does not have the Delete Volume command!

To erase the disk in such a situation, we must bring heavy artillery: the command prompt. Run the command prompt As Administrator. (If it's not on the right-click menu of the Start button, you should find it under the Windows System group on Start menu.) Now recall that the disk we want to erase was listed as Disk 2 in the Disk Management list. Enter the following commands into the command prompt to erase it:

diskpart
list disk
select disk 2
clean
exit

Before issuing the clean command, double check the list of the disks displayed and make sure you have selected the correct disk number. This is the point of no return: once the clean command is finished, all data and all partitions are deleted from the selected drive. If you have selected a wrond drive, there is no easy way to recover its data after the clean command.

While you are issuing the commands, the command prompt window should look similar to the following:

Using command prompt and DISKPART to erase a disk and delete EFI system partition

The next step in the rejuvenation of the old hard disk is to initialize it. While the disk you've just cleaned is still connected to the computer, run Disk Management again, and it should prompt you to initialize the disk automatically:

Disk Management prompts you to initialize the disk

Which option to choose, MBR or GPT? This question deserves a separate article, but for now the rule of thumb is: if the disk size is less than 2TB, it's OK to choose MBR. For larger disks, choose GPT.

The final step is to create a volume on the freshly initialized disk and format it. You can do it all within the Disk Management screen, by right-clicking on the Disk 2 entry and using the New Simple Volume command on the shortcut menu:

Using Disk Management to create  new volume and format it

After the last step is done, close Disk Management, and look inside the This PC folder: your newly refreshed old hard drive should appear there, with its own drive letter, ready for use.

Happy disk managing!

If you want to link to this article, you can use this HTML code: <a href="https://www.winability.com/force-diskpart-delete-remove-efi-system-partition-windows-10/">Force DISKPART to delete EFI system partition in Windows 11 and 10</a>

Read more