[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-04 Thread Balint Reczey
APT and u-u and marking work as designed.

** Changed in: unattended-upgrades (Ubuntu)
   Status: Incomplete => Invalid

** Changed in: apt (Ubuntu)
   Status: Incomplete => Invalid

** Summary changed:

- apt autoremove is not removing unused kernels
+ discover is not removing unused kernels

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  discover is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-03 Thread Erich Eickmeyer 
TJ:

linux-image-5.4.0-40-generic/focal-updates,focal-security,now 5.4.0-40.44 amd64 
[installed,automatic]
linux-image-5.4.0-40-lowlatency/focal-updates,focal-security,now 5.4.0-40.44 
amd64 [installed,automatic]
linux-image-5.4.0-42-generic/focal-updates,focal-security,now 5.4.0-42.46 amd64 
[installed,auto-removable]
linux-image-5.4.0-42-lowlatency/focal-updates,focal-security,now 5.4.0-42.46 
amd64 [installed,auto-removable]
linux-image-5.4.0-65-generic/focal-updates,focal-security,now 5.4.0-65.73 amd64 
[installed]
linux-image-5.4.0-65-lowlatency/focal-updates,focal-security,now 5.4.0-65.73 
amd64 [installed]
linux-image-5.8.0-34-generic/focal-updates,focal-security,now 
5.8.0-34.37~20.04.2 amd64 [installed,automatic]
linux-image-5.8.0-34-lowlatency/focal-updates,focal-security,now 
5.8.0-34.37~20.04.2 amd64 [installed,automatic]
linux-image-5.8.0-41-generic/focal-updates,focal-security,now 
5.8.0-41.46~20.04.1 amd64 [installed]
linux-image-5.8.0-41-lowlatency/focal-updates,focal-security,now 
5.8.0-41.46~20.04.1 amd64 [installed]
linux-image-generic-hwe-20.04/focal-updates,focal-security,now 
5.8.0.41.46~20.04.27 amd64 [installed,automatic]
linux-image-generic/focal-updates,focal-security,now 5.4.0.65.68 amd64 
[installed,automatic]
linux-image-lowlatency-hwe-20.04/focal-updates,focal-security,now 
5.8.0.41.46~20.04.27 amd64 [installed,automatic]
linux-image-lowlatency/focal-updates,focal-security,now 5.4.0.65.68 amd64 
[installed,automatic]

Balint:
Result: https://paste.ubuntu.com/p/JVHZpFWBBT/

It appears as though apt and u-u are doing the job, but for some reason
the packages aren't getting marked as autoremovable when they're
upgraded? I had to manually mark these as autoremovable (apt-mark linux-
image-${version}-${generic|lowlatency} auto) to get u-u or apt to do
anything about it. If you look at the list above, even the 5.4.0-65 and
5.4.0-41 kernels are showing up as manually installed, which is not the
case (they were installed via their respective metapackages).

So, something is definitely not working as expected.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-03 Thread Balint Reczey
Please install a few old kernels manually, mark them autoremovable and
run u-u in verbose and debug mode.

If u-u removes those kernels this is not an u-u bug.

Then install those again and try removing them with apt.

If apt removes those kernels than this is not an APT bug.

** Changed in: unattended-upgrades (Ubuntu)
   Status: New => Incomplete

** Changed in: apt (Ubuntu)
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread TJ
Erich, looks like that code wasn't reached or if it was the object
(list) "auto_removable" was empty.

Maybe the problem is outside this code. Does apt think those packages
are still installed?

apt list --installed 'linux-image*'


Also, what is the actual content of /boot/ ("ls -latr /boot/") ? I'm wondering 
if it could be that the kernels (linux-image-*) packages have been removed but 
the (space-eating) initrd,img* files have remained. Each of those can be close 
to 50MB.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread Erich Eickmeyer 
** Changed in: unattended-upgrades (Ubuntu)
   Status: Incomplete => New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread Erich Eickmeyer 
Hi TJ,

Here's the output from the patched version:
https://paste.ubuntu.com/p/dzGqfR9PRH/

I hope this helps. Thanks for chipping-in!

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread Ubuntu Foundations Team Bug Bot
The attachment "Kernel pkg debugging" seems to be a patch.  If it isn't,
please remove the "patch" flag from the attachment, remove the "patch"
tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the
team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread TJ
I haven't been able to test this since the systems I have here don't
have any kernel images lying around, but wondering if this patch could
help narrow down the cause?

Apply to a (copy) of /usr/bin/unattended-upgrade - possibly put in
/usr/local/bin/ so it is called before the package-installed version
(don't forget to clear the bash hash cache ("hash -r") first)

Then:

sudo /usr/local/bin/unattended-upgrade --verbose --debug

** Patch added: "Kernel pkg debugging"
   
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+attachment/5459187/+files/kernel-pkg-debug.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread Erich Eickmeyer 
Balint:

Here's the result:
https://paste.ubuntu.com/p/9kbT6HDpjw/

Bear in mind, I have a few external repositories, and we also ship a
bunch of external repositories by default. That said, none of those
should affect this as they don't contain kernels, nor do we pin any
kernels.

If you'd like, I'll ask the company president to give me the output of
the same command.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread Balint Reczey
@eeickmeyer Please run manually:


sudo unattended-upgrade --verbose --debug

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread Erich Eickmeyer 
Balint:

Here's the results, looks like everything matches what you've got there.

erich@erich-KFocus:~$ cat /etc/apt/apt.conf.d/20auto-upgrades 
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "1";
erich@erich-KFocus:~$ apt-config dump | grep Periodic
APT::Periodic "";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "1";
erich@erich-KFocus:~$ 


TJ: These are high-performance laptop computers and are usually plugged-in. Our 
clients include NASA's Jet Propulsion Laboratory.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread TJ
I'm also wondering if these are laptops or desktops, and if laptops, are
they mainly on battery whilst not sleeping/charging? I ask since apt-
daily-upgrade.service has:

ConditionACPower=true

and so may be reporting:

Condition check resulted in Daily apt upgrade and clean activities being
skipped.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread Balint Reczey
Is unatteded-upgrade disabled on the system?
$ cat /etc/apt/apt.conf.d/20auto-upgrades 
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

$ apt-config dump | grep Periodic
APT::Periodic "";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "1";


** Changed in: unattended-upgrades (Ubuntu)
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread Erich Eickmeyer 
Hi Balint!

Unfortunately, it looks like it didn't run at all. On my system, I came
up with this:

root@erich-KFocus:/var/log/unattended-upgrades# grep 'unused kernel' 
/var/log/unattended-upgrades/*.gz
root@erich-KFocus:/var/log/unattended-upgrades# 

That tells me it likely didn't run at all.


** Changed in: unattended-upgrades (Ubuntu)
   Status: Incomplete => New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1914278] Re: apt autoremove is not removing unused kernels

2021-02-02 Thread Balint Reczey
The configuration file is fine, it is the default value that's commented
out.


Please check unattended-upgrades logs if it performed kernel removals:
zgrep 'unused kernel' /var/log/unattended-upgrades/*.gz

Also please check if it ran at all.


** Changed in: unattended-upgrades (Ubuntu)
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914278

Title:
  apt autoremove is not removing unused kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs