my computer complains that the /boot partition is nearly full and I cannot update my system due to this. It seems like old kernels and whatnot are using up all the space. What do I need to delete in order to free space up in /boot?
It appears you have upgraded to fedora 37.
For some reason you have all the kernel related files in /boot that apply to numerous older fedora 36 kernels.
I even see 3 different rescue images there.
I would first do dnf list installed kernel* as see exactly what kernels are actually installed.
If that output shows more than 3 kernel versions then something is different with the dnf config than standard which only by default keeps the 3 most recent kernels.
If the listing from the above returns more than 3 kernel versions, especially if it shows kernels all the way back to the 5.19.10 version, you should run sudo dnf remove kernel*VERSION* where you replace VERSION with the actual kernel version you wish to remove. This can be repeated as many times as necessary to eliminate all but the latest 3 kernel versions.
You might look at /etc/dnf/dnf.conf to see how many kernels it is configured to keep. The default is installonly-limit=3. If that has been modified or removed then it may keep more kernels, which could explain why you have so many kernel files showing up in /boot.
# see `man dnf.conf` for defaults and possible options
[main]
gpgcheck=True
installonly_limit=3
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True
# User applied confs
fastestmirror=True
max_parallel_downloads=10
defaultyes=True
keepcache=True
This results in the same problem of not all kernels beings shown.
I can only think of manually deleting the files, but I do not know which.
Compare the list you received with dnf list installed kernel* and the list you received with ls /boot.
Any files in the ‘ls’ listing that begin with config-VERSION, initramfs-VERSION, symvers-VERSION, System.map-VERSION, or vmlinuz-VERSIONwhere VERSION does not match the ones shown in the ‘dnf list’ command can be removed manually with sudo rm /boot/<filename>.
There may also be unloved and unwanted old /lib/modules directories corresponding to the kernels you removed. There is also a question of why you had so many old kernels despite a setting that should limit the number to 3 plus a rescue kernel.
I just deleted 9 old initramfs files in the range of “fc22” till “fc30”. What mechanism should delete those? I used to install nvidia drivers manually in that time (some of these initramfs end in nvidia.img, most in nouveau.img), maybe that messed up the automatic cleanup
files that are not created and installed by the system during updates do not get deleted during updates. Manually compiling is one way to break the automatic updates.
My /boot has the following, for the latest 3 kernels and only the rescue kernel additional
Notice that only the initramfs and vmlinuz files are there for the rescue kernel
If the user does not add anything beyond what the system automatically installed with an upgrade then the system automatically removes the older ones when there is a kernel upgrade. If the file names are different the system cannot manage the files that are differently named.
Theoretically your system should not have anything other than shown above, but maybe differing for the last 3 kernels installed.
The command dnf list installed kernel should show you the currently installed kernel versions and those should be the only ones in /boot (except the rescue kernel).