Remove Ubuntu GRUB and use Fedora's one

I recently removed Ubuntu from my system and installed Fedora 35 KDE spin. I want to get rid of Ubuntu GRUB since Ubuntu itself no longer exists on my system. I changed the boot order to boot Fedora GRUB first, but I want to completely remove Ubuntu’s one.
Output of lsblk in case it is needed:

sda           8:0    0 931.5G  0 disk 
└─sda1        8:1    0 931.5G  0 part /mnt/sda1
sr0          11:0    1  1024M  0 rom  
zram0       252:0    0   7.5G  0 disk [SWAP]
nvme0n1     259:0    0 232.9G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part /boot/efi
├─nvme0n1p2 259:2    0     1G  0 part /boot
├─nvme0n1p3 259:3    0 121.4G  0 part /home
└─nvme0n1p4 259:4    0   110G  0 part /

/dev/sda is my secondary HDD used for backups, it has no OS on it.

You did format that drive where you have ubuntu right still you can see ubuntu grub
Or you can see ububtu in fedora grub?

Basically what happened is deleting Ubuntu’s root partition then using that free space for Fedora.

okey hence you can see fedora grub right.
Okey remember most of the times it is not a big issue. So you don’t need to worry about a grub is a small file and don’t create any issues in system

Can you ls the /boot.

To get all the contents of /boot at once: Output of sudo tree -a /boot showed me possibly what I should delete:

├── efi
│   ├── EFI
│   │   ├── BOOT
│   │   │   ├── BOOTIA32.EFI
│   │   │   ├── BOOTX64.EFI
│   │   │   ├── fbia32.efi
│   │   │   ├── fbx64.efi
│   │   │   └── mmx64.efi
│   │   ├── fedora
│   │   │   ├── BOOTIA32.CSV
│   │   │   ├── BOOTX64.CSV
│   │   │   ├── gcdia32.efi
│   │   │   ├── gcdx64.efi
│   │   │   ├── grub.cfg
│   │   │   ├── grubia32.efi
│   │   │   ├── grubx64.efi
│   │   │   ├── mmia32.efi
│   │   │   ├── mmx64.efi
│   │   │   ├── shim.efi
│   │   │   ├── shimia32.efi
│   │   │   └── shimx64.efi
│   │   └── ubuntu
│   │       ├── BOOTX64.CSV
│   │       ├── grub.cfg
│   │       ├── grubx64.efi
│   │       ├── mmx64.efi
│   │       └── shimx64.efi

So I will sudo rm -rf /boot/efi/EFI/ubuntu
Edit: Ubuntu GRUB was successfully removed without bricking my system (at least from the UEFI entries), so I will mark this as the solution.

Where did you change that order? In the BIOS (UEFI, firmware, how is it called today)?

In the BIOS settings, which has also UEFI settings like boot order and such.

Good. Then you have to look at the UEFI boot entries.
What’s the result of this command?
sudo efibootmgr

The problem was actually solved, which is also reflected by sudo efibootmgr:

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 2001,2002,0000,3000,2004
Boot0000* Fedora
Boot2001* EFI USB Device
Boot3000* Internal Hard Disk or Solid State Disk

Thanks for the help. If the solution I accepted is risky or not correct please correct me.

:thinking: In what way?

You can scroll up and check the solution. I basically used tree command to get all the contents of /boot. found a folder named ubuntu and deletd it.

Uh OK. I totally missed your previous post while I was replying :sweat_smile:

Nevermind, I appreciate everyone in here volunteering in their free time to help. So a big thanks :slight_smile:

1 Like

I don’t know if a more polite way could be this command
sudo efibootmgr -b <bootnum> -B
Where -b specifies the boot entry number and -B delete that boot entry.
Maybe under the hood such command delete the directory as you did by hand :slight_smile:

I don’t know about it, maybe it will just delete the efi entry and leave the ubuntu folder?
Thats probably safer than handling sudo rm -rf <anything>, it just takes a mistyped space to cause unintended damage.