Commit Graph

17 Commits

Author SHA1 Message Date
55432dea39 remove-old-kernels: Call uname -r just once
Based-on: 418d724 ("update-kernel: Call uname -r just once")
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2022-06-26 01:15:45 +03:00
b0c8b44d5e remove-old-kernels: Do not use grep to fix EVR
Based-on: 0da831a ("update-kernel: Do not use grep to fix EVR and improve Running kernel message")
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2022-06-26 01:12:49 +03:00
8e7e6ca193 Remove dependence on libshell
Trying to minimize dependence. No need whole library for three simple logging
functions (which used as basic `echo' wrappers).

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2022-04-07 08:21:47 +03:00
930c38e5e5 Fix multiple shellcheck warnings
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2022-04-04 10:29:45 +03:00
e679bb04e1 Do not use sudo
No need such hacks. User should call `update-kernel` under root.
This usage is also suggested in ALT wiki.
2022-04-03 03:30:17 +03:00
eb6ddc1e4c Support for single word kernel flavours 2020-02-12 16:30:43 +03:00
Oleg Solovyov
b5ca07e13f do not waste time invoking apt when there is nothing to remove 2019-12-20 14:48:28 +03:00
Oleg Solovyov
a55e5bb48e scan flavours and remove all old kernels 2019-12-19 16:30:51 +03:00
Oleg Solovyov
5e37d67ac1 remove-old-kernels: check for latest kernel
ALTBUG: #34314
When flavor specified, find out which kernel is latest and protect it
from removing.
2019-12-19 11:38:46 +03:00
Ivan Zakharyaschev
03e0c8c7e7 remove-old-kernels: specify installed pkgs as NAME=E:V-R rather than by their APT id
The APT id (with a #) can change in different versions of APT, but the
provided NAME=E:V-R remains the same.

This is useful for APT which adds disttags and buildtimes to the VerStrs.

# Conflicts:
#	remove-old-kernels
2019-05-28 14:27:52 +03:00
Vitaly Lipatov
fd5a2531d9 add -y option as alias for -f (force operation) (ALT bug 35283) 2018-08-22 16:44:27 +03:00
Vitaly Lipatov
027198d2b8 remove-old-kernels: check only current flavour (or used with -t) (ALT bug #30717)
remove-old-kernels: do not delete current or newest kernel
2016-04-24 03:42:48 +03:00
Evgenii Terechkov
7369515c91 Add help/force/dry-run options to remove-old-kernels 2016-01-23 10:56:45 +07:00
Vladimir V. Kamarzin
5eaa804ff3 remove-old-kernels: don't include shell-error (not needed)
Signed-off-by: Vladimir V. Kamarzin <vvk@altlinux.org>
2008-12-28 17:56:43 +05:00
Vladimir V. Kamarzin
4d85a75c74 remove-old-kernels: rename apt_list -> apt_args_list
Signed-off-by: Vladimir V. Kamarzin <vvk@altlinux.org>
2008-12-28 17:49:02 +05:00
Vladimir V. Kamarzin
1799b39030 remove-old-kernels: add "epoch" support
Signed-off-by: Vladimir V. Kamarzin <vvk@altlinux.org>
2008-12-28 17:41:11 +05:00
Vladimir V. Kamarzin
60e3e84b71 remove-old-kernels: initial version
This is simple script for removing all kernels except current.
Doesn't support Epoch at this time.

Signed-off-by: Vladimir V. Kamarzin <vvk@altlinux.org>
2008-12-28 17:28:44 +05:00