Hi @amitgold! Welcome to the community. Please take a minute to go through the posts in #start-here here if you haven’t had a chance yet.
By default, Fedora keeps the last 3 kernels to be on the safe side. So in case the newest kernel doesn’t work as well as it should with your hardware, you can reboot into an older one. These are what you see in your grub boot menu. You can see what these are using rpm:
If you are not low on disk space, I would strongly recommend leaving these installed. However, if you must remove a kernel, simply use dnf remove ... but please do be careful
The default number of kernels that are kept around are configured in the dnf configuration file: /etc/dnf/dnf.conf. You can read more about this file using its man page: man dnf.conf. Here are the relevant bits for your convenience:
installonlypkgs
list
List of provide names of packages that should only ever be installed, never upgraded. Kernels in particular fall into this category. These packages are never removed by
dnf autoremove even if they were installed as dependencies (see clean_requirements_on_remove for auto removal details). This option append the list values to the default
installonlypkgs list used by DNF. The number of kept package versions is regulated by installonly_limit.
installonly_limit
integer
Number of installonly packages allowed to be installed concurrently. Defaults to 3. The minimal number of installonly packages is 2. Value 0 or 1 means unlimited number of
installonly packages.
So, since I don’t have an installonlypkgs option in my /etc/dnf/dnf.conf, the kernel package is in the default installonlypkgs list used by DNF.
Do you know how to see such default list?
No worries, when you’ve earned enough “trust”, please come back to this post and mark the answer as correct if you think it is so. (How to do this, and more is documented in the #start-here posts).