Description of problem: By default, performing updates and upgrades under Mageia keep all old installed kernels. Unfortunately, when there isn't enough space on the disk, Mageia fails to run and it's very difficult for beginners to understand that the problem comes from those old kernels (it happened to a friend of mine...). However, YUM and DNF are available, installonly_limit is set to 3 in etc/yum/yum.conf and in etc/dnf/dnf.conf but this setting isn't taken into account. dnf remove $(dnf repoquery --installonly --latest-limit=-2) tries to remove all kernels including the currently loaded kernel. Version-Release number of selected component (if applicable): How reproducible: Every time I install a new kernel Steps to Reproduce: 1. Install Mageia 2. Perform several updates and upgrades that bring numerous kernels 3. All kernels are kept Workaround: You can manually uninstall all obsolete kernels one by one with urpme. You can use my script to remove all kernels except the most recently installed kernel and the kernel currently in use: #!/bin/bash # script written by Julien Gouesse, under General Public License version 2 if [ ! -n "$BASH" ] then echo "Please run $0 with bash" exit 1 fi if [ "$EUID" -ne 0 ] then echo "Please run $0 as root" exit 2 fi kernelType=$(uname -r | cut -f 2 -d "-") kernelReleaseNumber=$(uname -r | cut -f 1 -d "-") kernelPatchLevelAndDistro=$(uname -r | cut -f 3 -d "-") currentlyLoadedKernelPackagePrefix="kernel-$kernelType-$kernelReleaseNumber-$kernelPatchLevelAndDistro" latestKernelPackagePrefix="kernel-$kernelType-latest-" mostRecentlyInstalledKernelVirtualPackagePrefix=$(rpm -qa|grep $latestKernelPackagePrefix) mostRecentlyInstalledKernelPackagePrefix=${mostRecentlyInstalledKernelVirtualPackagePrefix/-latest/} packagesToDeinstall="" for i in $(rpm -qa|grep kernel-desktop-) do if [[ "$i" != *"$currentlyLoadedKernelPackagePrefix"* ]] && [[ "$i" != *"$mostRecentlyInstalledKernelVirtualPackagePrefix"* ]] && [[ "$i" != *"$mostRecentlyInstalledKernelPackagePrefix"* ]] then packagesToDeinstall+=" $i" fi done if [ "$packagesToDeinstall" == "" ] then echo "No kernel to deinstall" else urpme $packagesToDeinstall fi
This is already reported. Duplicate of Bug 24403
Closing as duplicate *** This bug has been marked as a duplicate of bug 24403 ***
Resolution: (none) => DUPLICATEStatus: NEW => RESOLVEDCC: (none) => davidwhodgins