Kernel number limit
-
Hi Sergi,
I wanted to give you a quick piece of feedback regarding Soplos Welcome (the Kernels section). I know I'm probably an outlier here because I created a dedicated 1GB /boot partition on my MacBook Pro, which isn't very common nowadays.
However, the kernel update cycle over the last 15 days has been quite intense, and my boot partition quickly filled up to 80%. I noticed that the "Clean Old Kernels" tool in Soplos Welcome works as an "all or nothing" solution—it offers to purge every single older kernel, leaving only the currently running one.
Since Soplos is based on Forky and is essentially a one-man show, I prefer to keep at least 3 kernel versions (the current one + 2 older functional backups) just to be safe. If a new kernel misbehaves after an update, I need a working fallback to boot into.
Could you please consider adding an option to the GUI allowing users to choose how many old kernels they want to keep (e.g., a limit of 3)?
For now, I've resolved this on my end by creating a permanent rule via a custom APT hook. Whenever packages are updated, it checks the number of installed kernels. If there are more than 3, it automatically and safely purges the oldest one using dpkg (to avoid APT looping) and updates GRUB. I placed it in /etc/apt/apt.conf.d/99soplos-kernel-limit:
DPkg::Post-Invoke { "if [ $(dpkg -l | grep -E '^ii linux-image-[0-9]' | wc -l) -gt 3 ]; then KERNELS=$(dpkg -l | grep -E '^ii linux-image-[0-9]' | awk '{print $2}' | sort -V); OLDEST=$(echo "$KERNELS" | head -n 1); VER=$(echo "$OLDEST" | sed 's/linux-image-//'); CURRENT=$(uname -r); if [ "$CURRENT" != "$VER" ]; then echo "[Soplos Kernel Limit] Nalezena > 3 jádra. Automaticky odstraňuji nejstarší: $VER"; dpkg --purge "linux-image-$VER" "linux-headers-$VER"; update-grub; fi; fi"; };
Maybe a similar automation or an APT hook that retains n-versions could be useful directly in the distribution for users who forget to clean up manually via the app.
Thanks for your hard work on Soplos Linux, it runs great! -
Hi, Dan669.
Thanks for your feedback and for explaining your use case in detail. You're right that keeping several kernel versions can be very useful as a fallback if an update causes any issues.
You can currently manage this directly using the existing Soplos Linux tools, without having to create additional APT rules:
- Soplos Kernel Installer: you can individually uninstall any kernels you no longer want to keep.
- Soplos Sys Cleaner: you can also remove unwanted kernels by running it as
root.
This allows you to keep your current kernel and the two previous versions you want to retain as backups, removing only the others.
I also appreciate your suggestion to add an option for setting the number of kernels to keep. It's an interesting idea that I'll take into consideration when evaluating potential improvements to Soplos Welcome.
Thanks again for using Soplos Linux and for sharing your suggestions!
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login