To solve the problem try the following steps:
Step 1: Check Boot Partition Usage
First, let’s see what is taking up space in your boot partition:
- Open a terminal.
- Run the following command to check the usage of your boot partition:
bash
df -h /boot
This will show you how much space is being used and how much is left.
Step 2: Remove Old Kernels
If old kernels are taking up space, you can remove them. Fedora typically keeps several old kernels for safety, but if space is tight, you might want to remove some of them.
- List all installed kernels:
bash
sudo dnf list installed kernel
- Remove old kernels, but do not remove the current one (usually the one you’re booted into):
bash
sudo dnf remove kernel-<version>
Replace <version>
with the specific version numbers of the kernels you want to remove.
Step 3: Clean Up Rescue Disks
Rescue disks can also take up space. To clean them up:
- List all rescue disks:
bash
sudo ls /boot/vmlinuz-*-rescue*
- Remove unwanted rescue disks:
bash
sudo rm /boot/vmlinuz-*-rescue*
Step 4: Configure dnf
to Limit Kernel Versions
To prevent this from happening in the future, you can configure dnf
to limit the number of kernel versions it keeps:
- Open the
dnf.conf
file:
bash
sudo nano /etc/dnf/dnf.conf
- Add or modify the following line to limit the number of installed kernels to 3:
ini
installonly_limit=3
- Save and close the file (press
Ctrl + O
to save and Ctrl + X
to exit in nano
).
Step 5: Clean Up Package Cache (Optional)
You can also clean up the package cache to free up some additional space:
bash
sudo dnf clean all
Step 6: Check for BTRFS-Specific Tools
Since you’re using BTRFS, make sure you’re using tools specific to this filesystem to manage snapshots and space. BTRFS can take snapshots automatically, which might also use up space.
- List BTRFS snapshots:
bash
sudo btrfs subvolume list /
- If you find unnecessary snapshots, you can delete them:
bash
sudo btrfs subvolume delete /path/to/snapshot
Step 7: Reboot and Verify
After you’ve cleaned up the old kernels and rescue disks, reboot your system and check if the low space warning persists.