Okay, in update manager there is a checkbox to get update manager to
purge excess kernels.
However I've 3 of them now, and I thought at one time I had 4.
I know how to do it manually.-a-a Sudo apt autoremove doesn't do it now
with 3.
So what's the key to this?-a-a It used to do it with the autoremove in
22.2, but seems now, at least on my machine, in 22.3 it don't do it.
On 08/05/2026 23:16, Alan K. wrote:
Okay, in update manager there is a checkbox to get update manager toTry running this:
purge excess kernels.
However I've 3 of them now, and I thought at one time I had 4.
I know how to do it manually.-a-a Sudo apt autoremove doesn't do it now
with 3.
So what's the key to this?-a-a It used to do it with the autoremove in
22.2, but seems now, at least on my machine, in 22.3 it don't do it.
sudo apt purge --autoremove
On 5/8/26 6:45 PM, George wrote:
On 08/05/2026 23:16, Alan K. wrote:same thing.-a-a says nothing to remove upgrade or install
Okay, in update manager there is a checkbox to get update manager toTry running this:
purge excess kernels.
However I've 3 of them now, and I thought at one time I had 4.
I know how to do it manually.-a-a Sudo apt autoremove doesn't do it now
with 3.
So what's the key to this?-a-a It used to do it with the autoremove in
22.2, but seems now, at least on my machine, in 22.3 it don't do it.
sudo apt purge --autoremove
Okay, in update manager there is a checkbox to get update manager to
purge excess kernels.
However I've 3 of them now, and I thought at one time I had 4.
I know how to do it manually.-a-a Sudo apt autoremove doesn't do it now
with 3.
So what's the key to this?-a-a It used to do it with the autoremove in
22.2, but seems now, at least on my machine, in 22.3 it don't do it.
On Fri, 5/8/2026 9:34 PM, Alan K. wrote:
On 5/8/26 6:45 PM, George wrote:
On 08/05/2026 23:16, Alan K. wrote:same thing.-a-a says nothing to remove upgrade or install
Okay, in update manager there is a checkbox to get update manager toTry running this:
purge excess kernels.
However I've 3 of them now, and I thought at one time I had 4.
I know how to do it manually.-a-a Sudo apt autoremove doesn't do it now >>>> with 3.
So what's the key to this?-a-a It used to do it with the autoremove in >>>> 22.2, but seems now, at least on my machine, in 22.3 it don't do it.
sudo apt purge --autoremove
For some reason, a search tells me of a "purge-old-kernels" script. Apparently, this is only a valid approach before the year 2012.
On 08/05/2026 23:16, Alan K. wrote:
Okay, in update manager there is a checkbox to get update manager toTry running this:
purge excess kernels.
However I've 3 of them now, and I thought at one time I had 4.
I know how to do it manually.-a-a Sudo apt autoremove doesn't do it now
with 3.
So what's the key to this?-a-a It used to do it with the autoremove in
22.2, but seems now, at least on my machine, in 22.3 it don't do it.
sudo apt purge --autoremove
On 2026-05-08, George <Invalid@invalid.invalid> wrote:
On 08/05/2026 23:16, Alan K. wrote:
Okay, in update manager there is a checkbox to get update manager toTry running this:
purge excess kernels.
However I've 3 of them now, and I thought at one time I had 4.
I know how to do it manually.-a-a Sudo apt autoremove doesn't do it now
with 3.
So what's the key to this?-a-a It used to do it with the autoremove in
22.2, but seems now, at least on my machine, in 22.3 it don't do it.
sudo apt purge --autoremove
You can delete them individually in Update Manager, under View > Kernels. I think autoremove keeps at least one extra kernel in case there is a problem with the new one.
#1. Find all installed kernels
@lines = `dpkg --list | grep -i 'linux-image'`;
foreach (@lines) {
if (/^ii\s+linux-image-(\d[\S]+)/) {
push (@kernels, $1);
}
}
#1. Find all installed kernels
@lines = `dpkg --list | grep -i 'linux-image'`;
foreach (@lines) {
if (/^ii\s+linux-image-(\d[\S]+)/) {
push (@kernels, $1);
}
}
On Sat, 9 May 2026 12:18:51 +0200, jjb wrote:
#1. Find all installed kernels
@lines = `dpkg --list | grep -i 'linux-image'`;
foreach (@lines) {
if (/^ii\s+linux-image-(\d[\S]+)/) {
push (@kernels, $1);
}
}
OK, I didnrCOt notice you were specifically checking for packages with
status = installed. HererCOs an update to my code that includes such a
check:
import subprocess
kernel_list = list \
(
n
for s, n in
(l.split("\t", 1)
for l in
subprocess.check_output
(
args = ("dpkg-query", "-f" "${Status;-1}\t${Package}\n", "-W", "*linux-image*"),
text = True
).split("\n")
if l != ""
)
if s == "i"
)
print(kernel_list)
The output list is much shorter. ;)
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 08:03:40 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
1 files (1,366K bytes) |
| Messages: | 264,936 |