Ubuntu – How to remove fedora from boot menu after formatting the disk of fedora

bootdual-bootfedora

I have two disks 512 and 128 and i installed fedora on 128gb and i formatted the volume next day but when I start up I can still see some parts of fedora like fedora-workstation from dev/mapper/fedora and one more option I formatted the other disk completely but the boot menu of ubuntu still shows it , How do i remove them from the Ubuntu boot menu ? Help needed.
I tried the other answers from stack overflow but they weren't of much use to my situation.
Here's the output of sudo efibootmgr

BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,2001,2002,2003
Boot0001* ubuntu
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network

and output of sudo fdisk -l | sed -e '/Disk \/dev\/loop/,+5d'

Disk /dev/sdb: 476.96 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: Micron 1100 SATA
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 91821F0B-52DB-469D-9970-E75C7B6B44E5

Device       Start        End   Sectors   Size Type
/dev/sdb1     2048    1050623   1048576   512M EFI System
/dev/sdb2  1050624 1000214527 999163904 476.4G Linux filesystem


Disk /dev/sda: 119.25 GiB, 128035676160 bytes, 250069680 sectors
Disk model: RTOTJ128VGD2EYX 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 52492BA3-5D3F-4180-8F2B-8636EC02033E

Best Answer

Installing grub again will remove Fedora from the Ubuntu GRUB boot menu.

  1. Search for installed grub packages.

    apt list --installed | grep grub
    
  2. Reinstall all the grub packages and update grub.

    sudo apt install --reinstall package-name  
    sudo update-grub

    The above commands will reinstall and configure the grub packages and update grub. Replace package-name with the names of the grub packages from the results of step 1.

You can then run cat /boot/grub/grub.cfg to check that your Fedora entry has disappeared.

Related Question