purge old kernels

I’ve recently switched to tumbleweed and I’ve 2 old kernels and one old from tumbleweed (this tumbleweed updates are really fast! ), I see purge old kernels service in service manager and enabled. how to configure it to automaticaly puurge old kernels? Just for info here’s my kernels list

# rpm -qa | grep "kernel"
kernel-desktop-3.13.6-20.1.g0509ce5.x86_64
kernel-desktop-3.11.10-7.1.x86_64
kernel-firmware-20130714git-2.5.1.noarch
kernel-desktop-3.13.6-19.4.g4727218.x86_64
kernel-desktop-3.11.6-4.1.x86_64


and here’s the recent one

uname -r
3.13.6-20.g0509ce5-desktop


Before you destroy something, that is NOT your kernels list. It is a list of RPM installed packages with the string “kernel” in the name. This one

kernel-firmware-20130714git-2.5.1.noarch

is definitely NOT a kernel.

You can’t at the moment.
The purge-kernels script apparently has a bug that makes it not work correctly (or at all) on Tumbleweed:
https://bugzilla.novell.com/show_bug.cgi?id=864173

You can uninstall not wanted/needed kernel packages with YaST or zypper though. Just specify the exact version to zypper rm or click on the “Versions” tab in YaST.

But be careful: I’m not sure whether kernel-desktop-3.13.6-19.4.g4727218.x86_64 and kernel-desktop-3.13.6-20.1.g0509ce5.x86_64 are installed to different directories/use a different filename for the kernel (they should though I think). If not, removing one will break the other as well, so better keep one of the 3.11 kernels at first to be on the safe side.

And to stress what hcvv wrote: kernel-firmware is NOT a kernel. You should NOT uninstall that.

Purge kernels doesn’t work automatically on Tumbleweed, and hasn’t for some time. It should be configured by default as you re-based on 13.1.

You will need to delete unwanted kernels manually, upgrades are quite frequent on Tumbleweed, and Yast Software Management is good for that using the Versions tab.

Since you switched to Tumbleweed why not post in that forum, as @hcvv told you yesterday. There you might have noticed comments about the issue in a fairly recent thread.

Again, my question is: Why didn’t you ask in the Tumbleweed forum?

The last I heard, kernel purging was broken for tumbleweed. It is confused by the package names that tumbleweed uses.

My practice was to occasionally go into Software Manager, search for kernel, then select the “versions” tab. I would delete old versions for anything that matched the search and had multiple installed versions. As I recall, kernel-firmware was not one of those.

Or for a default install just search on kernel-desktop for a much shorter result without kernel-firmware, and usually just the one package (with multi-versions) to deal with.

I am not a tumbleweed user but i always disable the multiversion kernel option in /etc/zypp/zypp.conf after the installation during the first boot. I hope my post is useful.

I usually find kernel-desktop, several kernel-devel packages, and a kernel-syms package.

I’ll grant that the kernel itself is the one that takes a lot of space, particularly if you have a separate “/boot” that fills up.

Those extra kernel packages are not usually added during a default install (ref my post), and I never add them to my Tumbleweed system. As it happens, it does have separate /boot due to btrfs and Snapper on the root partition.

Btw, you do not need the pipe and the grep to look for a certain package. (Well maybe if you want the search to be case insensitive using the -i flag of grep.)

This should suffice if you’re looking for a package that has a kernel at the beginning.

rpm -qa "kernel*"

This one to match kernel either at the beginning or at the end.

rpm -qa "*kernel*"

Those code above will work if you did not change your default log-in shell, some folks had issues with the glob * while using other shells. You can just invoke bash with the -c flag if that is the case.

bash -c "rpm -qa *kernel*"

But hey if you manage to change your default log-in shell into something more advance then you probably know what you’re doing so… have a lot of fun! rotfl!

IMHO, after installation of a new kernel and its working properly for at least a week, there should be an option for the users as to whether they want to keep the old kernels or just keep the fresh, working kernel… may be in Yast or in the start-up screen. This should not be confusing for new users like me… or should be done as in Ubuntu ( or ubuntu based distros).

Dual booting with Windows 7 Ultimate and Opensuse 13.1 64 bit (KDE) , every time I have to make changes to the Grub using Grub cuztomiser…really painful… to see multiple grub entries…

Otherwise , I have no gripe against Opensuse .

I am nor sure if you are talking about Tumbleweed or not. This being a Tumbleweed question but not in the Tumbleweedd forum.
I am not using Tumbleweed and I do not have such an experience. When I get a new kernel through the Update repo, everything works as expected, no manual changing of whatever in Grub. And it seems ( IIRC I have read that somewhere on he forums and I see it happen on my systems), only the last used kernel is kept as a fall-back.

Well, that’s actually the job of the purge-kernels script/service. With the default settings it should remove all but 2 kernels (the current one and the previous working one).
But again, it has a bug at the moment, in that it cannot copy with Tumbleweeds kernel version numbers, and therefore fails to remove kernels.

I already posted about /etc/zypp/zypp.conf

Edit it, comment out multidistro kernel ( or whatever entry that has multiversion in that file ). Save it, you might need to reinstall the kernel package to reconfigure grub/grub2. Although I always do that after the first boot, before doing a system update, just to save me some headache in the long run. :wink:

To see what entry is being used in that file.

grep -Ev '^($|\|\#)' /etc/zypp/zypp.conf

To comment out that multidistrokernel lol!

printf '%s
' 'g/^multiversion/s/^/# /' w | ed -s /etc/zypp/zypp.conf

Check again if it is commented out.

grep -Ev '^($|\|\#)' /etc/zypp/zypp.conf

Good luck :wink:

There is an option to remove a kernel, just like the option to remove any other software package. It’s called Software Management. It’s a facility of YaST, and in the case of the kernel, you remove it using the Versions tab. New users doing their own system admin need to learn about software management on openSUSE anyway.

Dual booting with Windows 7 Ultimate and Opensuse 13.1 64 bit (KDE) , every time I have to make changes to the Grub using Grub cuztomiser…really painful… to see multiple grub entries…

Oh dear, I wonder how users who multi-boot with several distros and Windows manage to deal with the excruciating pain barrier, relatively speaking. :sarcastic:

If you run Tumbleweed in such a multi-boot situation, since it has the most kernel updates by far, I find that booting it as the main Grub2 significantly reduces the number of times I need to update grub.cfg. Then the system automatically updates grub.cfg for kernel additions/removals on Tumbleweed. For the “few and far between” kernel updates of the other systems, I update Tumbleweeds grub.cfg manually at the command line with a single command.

On 2014-03-22 08:56, bandelguy wrote:
>
> IMHO, after installation of a new kernel and its working properly for at
> least a week, there should be an option for the users as to whether
> they want to keep the old kernels or just keep the fresh, working
> kernel… may be in Yast or in the start-up screen. This should not
> be confusing for new users like me… or should be done as in Ubuntu (
> or ubuntu based distros).

This is done automatically. But it does not work in tumbleweed.
And of course you can remove the extra kernel yourself, in YaST, if you
so wish.

Just remember this is a question about tumbleweed, posted in the wrong
forum, so things get confusing.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-03-21 19:26, jetchisel wrote:
>
> I am not a tumbleweed user but i always disable the multiversion kernel
> option in /etc/zypp/zypp.conf after the installation during the first
> boot. I hope my post is useful.

That’s not recommended.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

My conclusion is that the majority od the posters here agree that this is a Tumbleweed problem.

Thus this will be moved to Tumbleweed and is CLOSED for the moment.

Moved from Install/Boot/Login and open again.