Use the diskpart to easily remove the EFI partition from your USB drive
If you utilized your USB as a bootable device, it likely has an EFI partition. This partition houses bootloaders, device driver files, utility programs, and data files like error logs. However, if you no longer want to utilize the USB as a boot device, you would likely want to delete the EFI partition from the USB drive to free up space.
However, deleting the EFI partition is not as simple as you might think because it requires the usage of the command prompt. But you have nothing to fear; this article will cover everything you need to know to achieve this.
When you go to Disk Management and right-click on the faulty USB device, all options are grayed off, making it impossible to delete the EPI partition, but take the step below to overcome this problem.
Use the diskpart
DiskPart is a command-line program for managing disks and partitions on Windows PCs. It is capable of creating, deleting, formatting, and resizing partitions, as well as doing other disk-related functions, making it the best option for deleting EFI partitions from your USB drive.
- Open the command prompt by holding the Windows + R keys simultaneously, type cmd in the text field, and press Ctrl + Shift + Enter to open cmd as administrator.
- In the command prompt, input the command below.
- Next, input the command below to list all the disks connected to your computer.
- From the list, look for the # connected to your USB drive.
- Next, choose the number associated with your USB drive. In this example, the number is 2.
- Now, enter the command below.
- Following the execution of the clean command, you may receive an error that says The system cannot find the file provided, See the event log for additional information. This error is acceptable as long as your USB device displays Unallocated in Disk Management.
- Following this process will enable you to remove the EFI partition from your USB drive.
The procedure described above will undoubtedly aid you in deleting the EFI partition from the USB drive. Remember that before using the clean command, backup the vital files and data included within it.
Check out this article about how to fix a command prompt that keeps crashing on Windows 11 if you have any problem with your command prompt.