[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
** No longer affects: gnome-software (Ubuntu Artful) ** No longer affects: gnome-software (Ubuntu) ** Changed in: unattended-upgrades (Ubuntu Xenial) Importance: Undecided => High ** No longer affects: apt (Ubuntu Artful) ** No longer affects: apt (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Tested with 1.1ubuntu1.18.04.7~16.04.2 on Xenial: root@x-uu-lp-1260041:~# apt-mark auto linux-image-extra-4.8.0-56-generic linux-image-extra-4.8.0-58-generic linux-image-extra-4.8.0-54-generic linux-image-extra-4.8.0-53-generic linux-image-extra-4.8.0-56-generic set to automatically installed. linux-image-extra-4.8.0-58-generic set to automatically installed. linux-image-extra-4.8.0-54-generic set to automatically installed. linux-image-extra-4.8.0-53-generic set to automatically installed. root@x-uu-lp-1260041:~# unattended-upgrade --verbose Initial blacklisted packages: Initial whitelisted packages: Starting unattended upgrades script Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,a=xenial-security, o=UbuntuESM,a=xenial, o=Ubuntu,a=xenial-updates Removing unused kernel packages: linux-image-extra-4.8.0-54-generic linux-image-4.8.0-54-generic Keeping auto-removable linux-image-extra-4.8.0-54-generic package(s) because it would also remove the following packages which should be kept in this step: libpam-systemd libsystemd0 libudev1 systemd systemd-sysv udev (Reading database ... 53554 files and directories currently installed.) Removing linux-image-extra-4.8.0-54-generic (4.8.0-54.57~16.04.1) ... run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-54-generic /boot/vmlinuz-4.8.0-54-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.8.0-54-generic /boot/vmlinuz-4.8.0-54-generic update-initramfs: Generating /boot/initrd.img-4.8.0-54-generic W: mdadm: /etc/mdadm/mdadm.conf defines no arrays. run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.8.0-54-generic /boot/vmlinuz-4.8.0-54-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 4.8.0-54-generic /boot/vmlinuz-4.8.0-54-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.8.0-54-generic /boot/vmlinuz-4.8.0-54-generic Removing linux-image-4.8.0-54-generic (4.8.0-54.57~16.04.1) ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.8.0-54-generic /boot/vmlinuz-4.8.0-54-generic update-initramfs: Deleting /boot/initrd.img-4.8.0-54-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.8.0-54-generic /boot/vmlinuz-4.8.0-54-generic Packages that were successfully auto-removed: linux-image-4.8.0-54-generic linux-image-extra-4.8.0-54-generic Packages that are kept back: linux-image-extra-4.8.0-54-generic Packages that will be upgraded: libpam-systemd libsystemd0 libudev1 systemd systemd-sysv udev Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log (Reading database ... 47681 files and directories currently installed.) Preparing to unpack .../systemd-sysv_229-4ubuntu21.17_amd64.deb ... Unpacking systemd-sysv (229-4ubuntu21.17) over (229-4ubuntu21.16) ... Processing triggers for man-db (2.7.5-1) ... Setting up systemd-sysv (229-4ubuntu21.17) ... Log ended: 2019-03-13 17:17:36 Log started: 2019-03-13 17:17:36 (Reading database ... 47681 files and directories currently installed.) Preparing to unpack .../udev_229-4ubuntu21.17_amd64.deb ... Unpacking udev (229-4ubuntu21.17) over (229-4ubuntu21.16) ... Preparing to unpack .../libudev1_229-4ubuntu21.17_amd64.deb ... Unpacking libudev1:amd64 (229-4ubuntu21.17) over (229-4ubuntu21.16) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for systemd (229-4ubuntu21.16) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for libc-bin (2.23-0ubuntu11) ... Setting up libudev1:amd64 (229-4ubuntu21.17) ... Setting up udev (229-4ubuntu21.17) ... addgroup: The group `input' already exists as a system group. Exiting. update-initramfs: deferring update (trigger activated) Processing triggers for libc-bin (2.23-0ubuntu11) ... Processing triggers for initramfs-tools (0.122ubuntu8.14) ... update-initramfs: Generating /boot/initrd.img-4.15.0-45-generic W: mdadm: /etc/mdadm/mdadm.conf defines no arrays. Log ended: 2019-03-13 17:17:44 Log started: 2019-03-13 17:17:45 (Reading database ... 47681 files and directories currently installed.) Preparing to unpack .../libpam-systemd_229-4ubuntu21.17_amd64.deb ... Unpacking libpam-systemd:amd64 (229-4ubuntu21.17) over (229-4ubuntu21.16) ... Preparing to unpack .../libsystemd0_229-4ubuntu21.17_amd64.deb ... Unpacking libsystemd0:amd64 (229-4ubuntu21.17) over (229-4ubuntu21.16) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for libc-bin (2.23-0ubuntu11) ... Setting up libsystemd0:amd64 (229-4ubuntu21.17) ... Processing triggers for libc-bin (2.23-0ubuntu11) ... (Reading database ... 47681 files and directories currently installed.) Preparing to unpack .../systemd_229-4ubuntu21.17_amd64.deb ... Unpacking systemd (229-4ubuntu21.17) over (229-4ubuntu21.16) ... Processing triggers for dbus (1.10.6-1ubuntu3.3) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for ureadahead (0.100.0-19) ... Setting up systemd (229-4ubuntu21.17) ... addgroup: The
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Hello Jarno, or anyone else affected, Accepted unattended-upgrades into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source /unattended-upgrades/1.1ubuntu1.18.04.7~16.04.0 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: unattended-upgrades (Ubuntu Xenial) Status: New => Fix Committed ** Tags removed: verification-done-xenial ** Tags added: verification-needed-xenial -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
** Changed in: unattended-upgrades (Ubuntu Artful) Status: In Progress => Won't Fix -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
This bug was fixed in the package update-manager - 1:17.10.14 --- update-manager (1:17.10.14) artful; urgency=medium * Offer removal of unused autoremovable kernel packages (LP: #1624644, #1675079) * Support package removals in install backends and really remove packages (LP: #1624644, #1675079) * Keep PEP 8 checks happy * Place .keep files in empty directories to keep them when converting the repo to git (LP: #1758963) -- Balint Reczey Sun, 25 Mar 2018 19:57:57 +0100 ** Changed in: update-manager (Ubuntu Artful) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
This bug was fixed in the package update-manager - 1:16.04.13 --- update-manager (1:16.04.13) xenial; urgency=medium * Offer removal of unused autoremovable kernel packages (LP: #1624644, #1675079) * Support package removals in install backends and really remove packages (LP: #1624644, #1675079) * Keep PEP 8 checks happy * Place .keep files in empty directories to keep them when converting the repo to git (LP: #1758963) -- Balint Reczey Sun, 25 Mar 2018 20:10:49 +0100 ** Changed in: update-manager (Ubuntu Xenial) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Verified update-manager for artful. ** Attachment added: "bug-1624644-verification.png" https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1624644/+attachment/5140527/+files/bug-1624644-verification.png ** Tags removed: verification-needed-artful ** Tags added: verification-done-artful -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Can anyone potentially perform verification of the artful packages? We usually prefer releasing packages for newer series first, although it's not really a big deal right now because xenial -> artful is not an official upgrade path anymore. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
** Tags removed: verification-failed-xenial ** Tags added: verification-done-xenial -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
@jarnos Verification is needed only for update-manager for now, thus I think you verified that the fix worked for Xenial. Could you please change the tag to reflect that or you would like to wait for the u-u fix, - which may come later? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
** Description changed: [Impact] * Update-manager and unattended-upgrades install many kernel packages during the lifetime of a release but does not remove them automatically leading to those packages filling disk space potentially completely filling /boot and making the system unable to install updates or even boot. * Stable release users are impacted by this bug for years and their systems already collected many autoremovable unused kernel packages, thus they would benefit from backporting the fix greatly. * The bug is fixed by removing autoremovable (not currently booted) kernel packages when running unattended-upgrades or update-manager. Update manager offers the kernel removals when there are other updates to be installed. [Test Case] 1. Install kernel packages to be removed, mark them auto-installed and run apt's kernel hook script to make apt consider them autoremovable: sudo apt install -y linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic sudo apt-mark auto linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic sudo /etc/kernel/postinst.d/apt-auto-removal 2. Also downgrade a package to be upgraded: - sudo apt-get install -y ca-certificates=20160104ubuntu1 + sudo apt-get install -y --allow-downgrades ca- + certificates=20160104ubuntu1 3. (update-manager). Run update-manager and observe that kernel packages are offered for removal in Details of updates. sudo update-manager 4. (update-manager) Click on Install Now and observe that the kernel packages are removed. 3. (unattended-upgrades, the fix comes in an update of u-u) Run unattended-upgrades manually and observe the removal of the autoremovable kernel packages: sudo unattended-upgrade -v [Regression Potential] The change may cause update-manager or unattanded-upgrades to remove used kernel packages or fail to install other package updates. [Other Info] The unattended-upgrades fix is uploaded with many other fixes and those may cause regressions in other areas in unattended-upgrades. [Original bug text] When using default settings for unattended-upgrade i.e. Unattended-Upgrade::Remove-Unused-Dependencies "false"; # default "false" Unattended-Upgrade::Remove-New-Unused-Dependencies "true"; # default "true" in configuration file /etc/apt/apt.conf.d/50unattended-upgrades, unattended-upgrade is unable to remove packages that become unused in conjunction with updating by other software such as update-manager or apt full-upgrade. This is because unattended-upgrade compares the list of unneeded packages before and after it upgrades packages to detect which packages are new unused ones. Consequently, if user installs new kernels using e.g. update-manager, the excessive kernels will not be removed by unattended-upgrade, and eventually (small) /boot will become full. Expected behavior: handle removing of unused packages differently at least until other package management software installed by default can handle removing of new unused packages. ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: unattended-upgrades 0.90 ProcVersionSignature: Ubuntu 4.4.0-36.55-generic 4.4.16 Uname: Linux 4.4.0-36-generic i686 ApportVersion: 2.20.1-0ubuntu2.1 Architecture: i386 CurrentDesktop: XFCE Date: Sat Sep 17 11:28:44 2016 InstallationDate: Installed on 2016-09-05 (11 days ago) InstallationMedia: Mythbuntu 16.04.1 LTS "Xenial Xerus" - Release i386 (20160719) PackageArchitecture: all SourcePackage: unattended-upgrades UpgradeStatus: No upgrade log present (probably fresh install) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Yes, it is good that update-manager can do removing, as that is what most people use anyway. linux-purge might still have some use e.g. if for some reason /boot becomes full, or there are non-autoremovable kernel packages (which may happen in 14.04 even with kernels installed using update-manager Bug #1439769). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
** Description changed: [Impact] - * Update-manager and unattended-upgrades install many kernel packages during the lifetime of a release but does not remove them automatically leading to those packages filling disk space potentially completely filling /boot and making the system unable to install updates or even boot. - * Stable release users are impacted by this bug for years and their systems already collected many autoremovable unused kernel packages, thus they would benefit from backporting the fix greatly. - * The bug is fixed by removing autoremovable (not currently booted) kernel packages when running unattended-upgrades or update-manager. Update manager offers the kernel removals when there are other updates to be installed. + * Update-manager and unattended-upgrades install many kernel packages during the lifetime of a release but does not remove them automatically leading to those packages filling disk space potentially completely filling /boot and making the system unable to install updates or even boot. + * Stable release users are impacted by this bug for years and their systems already collected many autoremovable unused kernel packages, thus they would benefit from backporting the fix greatly. + * The bug is fixed by removing autoremovable (not currently booted) kernel packages when running unattended-upgrades or update-manager. Update manager offers the kernel removals when there are other updates to be installed. [Test Case] - 1. Install kernel packages to be removed, mark them auto-installed and + 1. Install kernel packages to be removed, mark them auto-installed and run apt's kernel hook script to make apt consider them autoremovable: - sudo apt install -y linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic - sudo apt-mark auto linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic - sudo /etc/kernel/postinst.d/apt-auto-removal + sudo apt install -y linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic + sudo apt-mark auto linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic + sudo /etc/kernel/postinst.d/apt-auto-removal - 2. Also downgrade a package to be upgraded: + 2. Also downgrade a package to be upgraded: -sudo apt-get install -y ca-certificates=20160104ubuntu1 + sudo apt-get install -y ca-certificates=20160104ubuntu1 - 3. (update-manager). Run update-manager and observe that kernel + 3. (update-manager). Run update-manager and observe that kernel packages are offered for removal in Details of updates. - sudo update-manager + sudo update-manager - 4. (update-manager) Click on Install Now and observe that the kernel + 4. (update-manager) Click on Install Now and observe that the kernel packages are removed. - 3. (unattended-upgrades) Run unattended-upgrades manually and observe - the removal of the autoremovable kernel packages: + 3. (unattended-upgrades, the fix comes in an update of u-u) Run + unattended-upgrades manually and observe the removal of the + autoremovable kernel packages: - sudo unattended-upgrade -v + sudo unattended-upgrade -v [Regression Potential] - The change may cause update-manager or unattanded-upgrades to remove + The change may cause update-manager or unattanded-upgrades to remove used kernel packages or fail to install other package updates. [Other Info] - - The unattended-upgrades fix is uploaded with many other fixes and those may cause regressions in other areas in unattended-upgrades. + + The unattended-upgrades fix is uploaded with many other fixes and those + may cause regressions in other areas in unattended-upgrades. [Original bug text] When using default settings for unattended-upgrade i.e. Unattended-Upgrade::Remove-Unused-Dependencies "false"; # default "false" Unattended-Upgrade::Remove-New-Unused-Dependencies "true"; # default "true" in configuration file /etc/apt/apt.conf.d/50unattended-upgrades, unattended-upgrade is unable to remove packages that become unused in conjunction with updating by other software such as update-manager or apt full-upgrade. This is because unattended-upgrade compares the list of unneeded packages before and after it upgrades packages to detect which packages are new unused ones. Consequently, if user installs new kernels using e.g. update-manager, the excessive kernels will not be removed by unattended-upgrade, and eventually (small) /boot will become full. Expected behavior: handle removing of unused packages differently at least until other package management software installed by default can handle removing of new unused packages. ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: unattended-upgrades 0.90 ProcVersionSignature: Ubuntu 4.4.0-36.55-generic 4.4.16 Uname: Linux 4.4.0-36-generic i686 ApportVersion: 2.20.1-0ubuntu2.1 Architecture: i386 CurrentDeskto
Re: [Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
On Fri, Mar 30, 2018 at 3:12 PM, Jarno Suni <1624...@bugs.launchpad.net> wrote: > Brian, I tested the update-manager version you told. It is true that > update-manager removes the unused packages, but step 3. (unattended- > upgrades) does not remove the unused kernels. > > I add failed tag as this bug is originally about unattended-upgrades. Thanks for testing the fix and also thank you for preparing the linux-purge script. I read it but integrating it to to current tools would have been problematic and I hope you agree that the solution finally used is minimally intrusive and achieves removing unused kernels in a safe way. The fix for unattended-upgrades is not uploaded yet but is available Bionic and in the ppa:rbalint/scratch PPA if you would like to give it a try. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Brian, I tested the update-manager version you told. It is true that update-manager removes the unused packages, but step 3. (unattended- upgrades) does not remove the unused kernels. I add failed tag as this bug is originally about unattended-upgrades. ** Tags removed: verification-needed-xenial ** Tags added: verification-failed-xenial -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Testing is painfully slow because connection to e.g. archive.canonical.com is very slow. Downgrading in step 2 does not work without --allow-downgrades -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Hello Jarno, or anyone else affected, Accepted update-manager into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update- manager/1:17.10.14 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance! ** Changed in: update-manager (Ubuntu Artful) Status: In Progress => Fix Committed ** Tags added: verification-needed verification-needed-artful ** Changed in: update-manager (Ubuntu Xenial) Status: New => Fix Committed ** Tags added: verification-needed-xenial -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
** Description changed: + [Impact] + + * Update-manager and unattended-upgrades install many kernel packages during the lifetime of a release but does not remove them automatically leading to those packages filling disk space potentially completely filling /boot and making the system unable to install updates or even boot. + * Stable release users are impacted by this bug for years and their systems already collected many autoremovable unused kernel packages, thus they would benefit from backporting the fix greatly. + * The bug is fixed by removing autoremovable (not currently booted) kernel packages when running unattended-upgrades or update-manager. Update manager offers the kernel removals when there are other updates to be installed. + + [Test Case] + + 1. Install kernel packages to be removed, mark them auto-installed and + run apt's kernel hook script to make apt consider them autoremovable: + + sudo apt install -y linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic + sudo apt-mark auto linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic + sudo /etc/kernel/postinst.d/apt-auto-removal + + 2. Also downgrade a package to be upgraded: + +sudo apt-get install -y ca-certificates=20160104ubuntu1 + + 3. (update-manager). Run update-manager and observe that kernel + packages are offered for removal in Details of updates. + + sudo update-manager + + 4. (update-manager) Click on Install Now and observe that the kernel + packages are removed. + + 3. (unattended-upgrades) Run unattended-upgrades manually and observe + the removal of the autoremovable kernel packages: + + sudo unattended-upgrade -v + + [Regression Potential] + + The change may cause update-manager or unattanded-upgrades to remove + used kernel packages or fail to install other package updates. + + [Other Info] + + The unattended-upgrades fix is uploaded with many other fixes and those may cause regressions in other areas in unattended-upgrades. + + [Original bug text] + When using default settings for unattended-upgrade i.e. Unattended-Upgrade::Remove-Unused-Dependencies "false"; # default "false" Unattended-Upgrade::Remove-New-Unused-Dependencies "true"; # default "true" in configuration file /etc/apt/apt.conf.d/50unattended-upgrades, unattended-upgrade is unable to remove packages that become unused in conjunction with updating by other software such as update-manager or apt full-upgrade. This is because unattended-upgrade compares the list of unneeded packages before and after it upgrades packages to detect which packages are new unused ones. Consequently, if user installs new kernels using e.g. update-manager, the excessive kernels will not be removed by unattended-upgrade, and eventually (small) /boot will become full. Expected behavior: handle removing of unused packages differently at least until other package management software installed by default can handle removing of new unused packages. ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: unattended-upgrades 0.90 ProcVersionSignature: Ubuntu 4.4.0-36.55-generic 4.4.16 Uname: Linux 4.4.0-36-generic i686 ApportVersion: 2.20.1-0ubuntu2.1 Architecture: i386 CurrentDesktop: XFCE Date: Sat Sep 17 11:28:44 2016 InstallationDate: Installed on 2016-09-05 (11 days ago) InstallationMedia: Mythbuntu 16.04.1 LTS "Xenial Xerus" - Release i386 (20160719) PackageArchitecture: all SourcePackage: unattended-upgrades UpgradeStatus: No upgrade log present (probably fresh install) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Please fill in the Impact, Test Case and Regression Potential fields of the SRU recommended bug description [1]. Thank you! [1] https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
This bug was fixed in the package update-manager - 1:18.04.9 --- update-manager (1:18.04.9) bionic; urgency=medium * Keep PEP 8 checks happy -- Balint Reczey Wed, 21 Mar 2018 17:53:59 + ** Changed in: update-manager (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
This bug was fixed in the package unattended-upgrades - 1.0ubuntu1 --- unattended-upgrades (1.0ubuntu1) bionic; urgency=medium * Merge from Debian unstable - Remaining changes: - unattended-upgrades: Do not automatically upgrade the development release of Ubuntu unless Unattended-Upgrade::DevRelease is true. - Dropped changes, included in Debian: - Run upgrade-between-snapshots only on amd64. The test exercises only unattented-upgrade's Python code and uses dependencies from the frozen Debian snapshot archive thus running it on all architectures would provide little benefit. unattended-upgrades (1.0) unstable; urgency=medium [ Simon Arlott ] * Revert sending mails on WARNINGS when in MailOnlyOnError mode" * Consider conffile prompts to be errors (Closes: #852465) Flag packages that have to be upgraded manually because of a conffile prompt and consider this to be an error when sending email or exiting. [ Simon McVittie ] * Add python, python3, setuptools, DistutilsExtra to Build-Depends. They are needed for `clean`, so Build-Depends-Indep is not enough. * Add .gitignore and debian/.gitignore * Remove bzr configuration. This is unnecessary now that u-u is in git. [ Michael Vogt ] * unattended-upgrades: tweak mail-on-warnings PR * unattended-upgrade: extract is_autoremove_valid helper [ Balint Reczey ] * Run upgrade-between-snapshots only on amd64. The test exercises only unattented-upgrade's Python code and uses dependencies from the frozen Debian snapshot archive thus running it on all architectures would provide little benefit. * Clean up processes started for getting md5 sums * Don't keep /var/lib/dpkg/status open multiple times * Adjust candidates in UnattendedUpgradesCache.open() * Perform autoremovals in minimal steps, too. Also add check to remove only the set of packages selected for autoremoval. Without that check unattended-upgrades when (by default) configured to remove newly unused packages could also remove auto removable packages which were unused before starting starting the upgrade step. * Remove unused automatically installed kernel packages (LP: #1357093, #1624644, #1675079, #1698159) * Stop including Python syntax in the report (Closes: #876796) * Do not auto remove packages related to the running kernel (LP: #1615381) * Check packages to be autoremoved against blacklists, whitelists. Also check if the packages are held. * Report package removals in the summary email (Closes: #876797) * Run upgrade-between-snapshots test with debugging enabled * Don't create new UnattendedUpgradesCache for checking for autoremovals .open() refreshes the state in each cache_commit(), this is enough * Update .pot and .po files * Update .travis.yml to actually build and test u-u from the repo * Run only a simple installation test on Travis, the system upgrade test was always failing -- Balint Reczey Thu, 01 Mar 2018 17:29:33 +0700 ** Changed in: unattended-upgrades (Ubuntu) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
** Changed in: unattended-upgrades (Ubuntu) Status: In Progress => Fix Committed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
** Tags added: id-59653842b438d4859259928d -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
I'm working on removing old kernels in u-u and also make the similar changes to update-manager: https://github.com/mvo5/unattended- upgrades/pull/97 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
** Changed in: unattended-upgrades (Ubuntu) Status: Opinion => In Progress ** Changed in: unattended-upgrades (Ubuntu Artful) Status: Opinion => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Observe #1267059 about 'Unattended-Upgrade::Remove-Unused-Dependencies' not working as expected for old versions of unattended-upgrades, also resulting e.g. in obsolete kernel packages not getting removed. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: apt (Ubuntu Artful) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: apt (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
** Changed in: update-manager (Ubuntu) Assignee: (unassigned) => Balint Reczey (rbalint) ** Changed in: update-manager (Ubuntu Artful) Assignee: (unassigned) => Balint Reczey (rbalint) ** Changed in: update-manager (Ubuntu) Status: New => In Progress ** Changed in: update-manager (Ubuntu Artful) Status: New => Confirmed ** Changed in: update-manager (Ubuntu Artful) Status: Confirmed => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
s/to title/the title/ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
Changed to title to reflect that the issue is not about something not implemented, but something not set as default. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1624644] Re: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software
** Summary changed: - By default settings unattended-upgrade is unable to automatically remove packages that become unused in conjunction with updating by other software. + By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software ** Changed in: unattended-upgrades (Ubuntu) Status: New => Confirmed ** Changed in: unattended-upgrades (Ubuntu Artful) Status: New => Confirmed ** Changed in: unattended-upgrades (Ubuntu) Status: Confirmed => Opinion ** Changed in: unattended-upgrades (Ubuntu Artful) Status: Confirmed => Opinion -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1624644 Title: By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other software To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1624644/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs