2
votes
Cleaning-up previous kernel RPMs after reboot
dnf config-manager setopt installonly_limit=2
Will set the limit of such packages, to take effect in the next transaction. Two is the minimum limit enforced here.
Or,
dnf remove $(dnf repoquery -q --...
2
votes
Cleaning-up previous kernel RPMs after reboot
Not 100% accurate but simple enough:
rpm -qa |
awk -F- -v r="$(uname -r)" '$1 == "kernel" && !index($0, r)'
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
linux × 39056bash × 2881
ubuntu × 2330
shell-script × 1944
networking × 1911
debian × 1800
shell × 1455
kernel × 1358
centos × 1356
linux-kernel × 1132
filesystems × 1098
ssh × 1078
command-line × 1036
rhel × 952
awk × 881
permissions × 842
sed × 833
files × 828
mount × 767
process × 742
scripting × 677
boot × 677
terminal × 655
systemd × 638
memory × 631