top of page

EFI, How I cleared out out bootloader info

  • Writer: VC Healy
    VC Healy
  • Jan 5, 2021
  • 2 min read

After installing a variety of Linux Distros I found that the EFI partition was filling up.

After a bit of research and figuring out how to access the EFI partition, I was able to determine there was a lot of leftover files from the various Distros I had tried.


Here is what I did to clear up all of this dross.


I tried a couple of partition managers but found they fell short of what I wanted them to do.

So I stopped wasting my day with this.


Time to open up the console in Administrator mode. (I use Powershell)

This brings the prompt to

C:\WINDOWS\system32


Time to use commands


diskpart

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart

This brings you to the DISKPART> prompt



list disk // As the name suggests this command will list all of the drives


sel disk 0 // The main drive is 0 and this is where the EFI partition should be


This message should now be echoed

Disk 0 is now the selected disk.


Now to find out the volumes on this disk

list vol // Gives a list of volumes on drive 0


The EFI volume will be one of the FAT32 partitions, on mine, there were two but the second was labeled as a recovery partition. So it was a simple choice to select the correct partition


sel vol 3


To make things a little easier, I assigned a letter to this partition, choosing the first letter available after C:

assign letter=D:


That's me finished with DISKPART so it is time to exit

exit


and back to C:\WINDOWS\system32 and switch to the EFI volume now

cd D:


ls // Yes, it's the *nix command to list the files on the volume and not dir


Now, as I was clearing out all of the Linux dross, I found a grub folder and other Linux files here. I removed these with...


rmdir **folderName**

rm **fileName**


Remember that autocomplete is available, type in the first few letters of a filename and press Tab to auto-complete.

Now into the EFI folder

cd EFI


ls


I found a variety of folders kali, Debian, Linux, MX19, Manjero, systemd. All from the old distros I had tried. So once again time to clear out these.


rmdir **folderName**

rm **fileName**


The two folders not to touch from what I know are Microsoft and Boot.


That got me back to where I wanted to be. I hope it helps you but do your own research before you start

 
 
 

留言


© 2020 by Vincent Healy. Proudly created with Wix.com

bottom of page