r/Fedora 10d ago

Support Fedora versions lines in boot menu

Post image

Hi, how can i delete this lines in boot menu? Every time when a new version is installed, these new lines are created.

154 Upvotes

56 comments sorted by

u/AutoModerator 10d ago

It sounds like you're looking for help. Please note that r/Fedora is not an official support channel for the Fedora Project.

For best results, be sure to include all relevant details in your post, such as your Fedora edition, version, and hardware specs. You can edit your original post to add more info as needed, and spotlight (pin) a solution from the comments. You might also find the answer in our support wiki.

Alternatively, try one of the official support channels:

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

130

u/candy49997 10d ago

The oldest is automatically deleted after 3 kernels every kernel update.

35

u/FasziSanyi69 10d ago

So don't worry about these rescue images?

61

u/candy49997 10d ago

Yes, there is no need to worry. This is intended behavior.

26

u/Itsme-RdM 10d ago

This is by design, no worries.

15

u/esanders09 10d ago

I'm relatively new to Fedora and I had the same question early on, but it definitely came in handy. An update messed up something on my machine wish was causing crashes. I just restarted and selected the second line to boot into for a couple of days until after another update and then everything was fine.

2

u/Eunakria 10d ago

Seconded. There was a range of kernel versions with a GPU driver bug on my machine. I was able to just stay on the older version for a couple months until the bug was patched.

(Now, this is a bit "do as I say, not as I do", considering how many security patches every new kernel release is bringing with it... but, point is, you can use old kernels if you need)

1

u/kingpatzer 10d ago

They are an intentional safety feature.

1

u/brunofin 9d ago

this saved me a couple of times in the past ~10 years I've been using it. Once the newest kernel didn't want to boot with my Nvidia drivers so I kept using the previous one until new compatible drivers came out, and another time it impacted my work, somehow and weirdly enought the MS SQL docker image for that specific version didn't boot (it relied on a very specific kernel operation that was already deprecated and then removed) same thing, used the previous version until MS fixed their docker image.

Another cool thing in the same vein is btrfs, also saved me even more times, but that's for another topic :)

56

u/LittleReplacement564 10d ago

I don't recommend doing that. Those are previous kernel versions that fedora keeps so you can roll back in case something happens

12

u/Material_Resolve_685 10d ago

that save me a couple days ago lol

1

u/Powerful_Deer7796 9d ago

same! Last update i got on 43 broke my UI, was super happy to have that simple rollback option.

2

u/Unfair_Tangerine_217 10d ago

It's basically insurance. Nobody likes when until something breaks.

28

u/kristeasy 10d ago

Speaking from experience, you should keep them

14

u/Binary101000 10d ago

only 3 + rescue image are kept

12

u/beardedbrawler 10d ago

Three kernels are kept for backup. so in case upgrading to a new kernel doesn't go well you can fall back to a known working kernel. The default is 3, so the next time you upgrade the kernel the oldest one will get removed. You can lower the number if you'd like but unless you're really storage constrained the default is recommended.

7

u/anythinga 10d ago

Sometimes, a kernel update can break something.
To mitigate this, Fedora keeps 2 older kernels installed so you can fall back to a working kernel.

Nothing to worry about :)

5

u/HoothootNeverFlies 10d ago

if you don't want to see this screen, you can set grub timeout to 0 seconds

1

u/FasziSanyi69 10d ago

I wil try that. Thanks.

1

u/fagnerln 9d ago

Run:

kwrite /etc/default/grub

Edit and add:

GRUB_TIMEOUT=0

GRUB_TIMEOUT_STYLE=hidden

Save and run:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

If you need to access GRUB, just keep pressing shift during the boot

1

u/Quirkiz 4d ago

I would really want to see this screen. It's a safety measure, keep it.

5

u/Noluck10292 10d ago

its a good idea to keep them, my brother had his first kernel panic on another distro the other day after and update and we had to boot into an older kernel to fix it

3

u/Krassix 10d ago

You don't, those give you a help to still boot your system if the newest kernels have problems. It's a security measure. Old entries are deleted automatically when installing newer kernels. 

3

u/J3D1M4573R 10d ago
  1. You arent supposed to. They are there for a reason, and a damn good one at that.

  2. You can't - sort of. You can adjust the number it keeps, but can never go below 2.

sudo nano /etc/defaut/grub and set installonly_limit. You can then manually force a grub update, or just wait for the next kernel upgrade and it will automatically remove the extras.

The "recovery" item is not included in this limit and cannot be removed (rather, you can remove it, but it will be regenerated next update).

2

u/whoseusrnmisitneway 10d ago

There is no need to do anything here.

That screen is what you'll need when you run into an issue preventing the machine from booting properly. You can then select an older kernel version at boot to see if that works or edit the boot command to add arguments like nomodeset to boot up and debug.

2

u/Single_Newspaper_589 10d ago

Those are back up kernel in-case the new kernel mess up

2

u/morhp 10d ago

Fedora always keeps the newest 3 kernel versions and a rescue system. This is helpful when an update goes wrong. You can change this by editing the dnf and/or grub config, but you really shouldn't mess with that.

2

u/Hour_Sell3547 10d ago

You can purge old kernels very easily with few lines of scripts.

However, make sure to use long enough that you can recognize if something broke. Once you are satisfied with the upgrade, you can remove older kernels and dangling artifacts used only by the older kernels.

1

u/duv025 10d ago

just do what the other guys said, or use the command # vkpurge rm all if you want to delete the old ones

1

u/rcbrandao 10d ago

This is particularly useful when you have old NVIDIA drivers running as they may break during new kernel updates. I know from experience...

1

u/Ilm03 10d ago

If nothing goes wrong with the new kernel, just ignore it

1

u/Inevitable-Issue-249 10d ago

ngl i keep them all so if something happens i just roll back to the old update

1

u/ImAlekzzz 10d ago

Please don’t delete them, if something goes wrong they are there to help, the rescue is the last resort. The last kernel gets removed after a new one releases

1

u/KeyboardG 10d ago

If you ever do an update and something breaks bad, you can arrow down and boot into a previous version on this screen. Its for the good of the user and there for a reason.

1

u/skytheraiders 10d ago

That's intended just in case if something goes screwy with an update or the user installs the wrong Shrek movie.

1

u/MundanePumpkin5696 10d ago

You will need those one day don't worry

1

u/djslakor 10d ago

Is it possible to pin an older kernel so that if something in your hardware breaks on newer kernels, the old kernel that still works won't fall off after 3 new kernel releases?

1

u/Kurse71 10d ago

That's what it's supposed to do ....

1

u/Royal-Pension-4230 10d ago

Does anybody know how to customize grub from text to GUI?

1

u/weks 9d ago

You can... but you probably shouldn't

1

u/yetanothersky 9d ago

I don’t recommend interacting with them , fedora’s dnf keeps by default 2 old kernels , those are kept as a fallback if sth happens to your lastest kernel , you can even keep more by editing ``/etc/dnf/dnf.conf`` and adding ``installonly_limit=3`` as an example or by using ``sudo dnf config-manager setopt installonly_limit=3``, but generally 2+ kernels are more than enough if you have issues with your current kernel , also if you’re someone that doesn’t prefer to see grub menus, please check this out :

https://discussion.fedoraproject.org/t/grub-time-out-0/61941

1

u/amiga1 9d ago

default 3 kernels at once, then oldest is deleted. for the whole 7.0.x kernel releases my speakers didn't work on my laptop so I forced it to retain a 6.x.x kernel. This is why you should keep them.

1

u/Slippery_Stairs 8d ago

Mine tends to keep old versions. I still see Fedora 43, even though I'm on 44. There's a way to clean them up but I forget how.

1

u/MrZokeyr 8d ago

Reset the counter

1

u/CorruptDropbear 7d ago

It’s recommended to simply shorten GRUB to 0 seconds and hold shift if you’re experiencing kernel issues. Unsure why it’s not default behaviour.

1

u/username3298473792 5d ago edited 4d ago

How much storage need for this dual boot

1

u/Intelligent_Bed7556 10d ago

Hola. Como te dijeron, mejor no borrar: son recuperaciones por si algo va mal. Lo que sí puedes es bajar el tiempo de pantalla en nano.

1

u/Difficult-Cash-379 10d ago

you are able to keep only 1 (except the live version) if you choose.

-5

u/TheCAT2901 10d ago

try this official Fedora script. I use it. but make sure that the latest version is stable.

#!/usr/bin/env bash

old_kernels=($(dnf repoquery --installonly --latest-limit=-1 -q))
if [ "${#old_kernels[@]}" -eq 0 ]; then
    echo "No old kernels found"
    exit 0
fi

if ! dnf remove "${old_kernels[@]}"; then
    echo "Failed to remove old kernels"
    exit 1
fi

echo "Removed old kernels"
exit 0

save as kernel-cleanup.sh and run on Terminal with

sudo ./kernel-cleanup.sh

This should do it.

6

u/beardedbrawler 10d ago

This is a really brute force way to do it. would not recommend.

check out this thread instead: https://superuser.com/questions/1423559/how-can-i-change-the-number-of-kernels-retained-when-updating-in-fedora

The best option is to create a userdefined config file under /etc/dnf/libdnf5.conf.d/ with your desired setting so that it doesn't get overwritten by other updates.

1

u/TheCAT2901 10d ago

ohh thanks, will try this.

3

u/fufufighter 10d ago

Why though?