[Bug 1772688] Re: Aptitude does not want to autoremove Linux kernel, while apt wants

Dmitry Lapshin lapshin.dv at mail.ru
Thu Aug 2 16:24:57 UTC 2018


It's actually the files that configure apt to do intended behavior, but
somehow aptitude has it's own mind :/

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

Title:
  Aptitude does not want to autoremove Linux kernel, while apt wants

Status in aptitude package in Ubuntu:
  Confirmed

Bug description:
  From some update last year or so, apt has achived the tools to remove
  old Linux kernels via /etc/kernel/postinst.d/apt-auto-removal. This is
  really great, but for some reason, all apt tools agree on this (apt-
  get autoremove, apt autoremove), but aptitude does not.

  For example, here I have an installation where 4.15.0-20 is safe for
  deinstallation, and generated by script above config agrees:

    $ LANG=C apt --dry-run autoremove
    NOTE: This is only a simulation!
          apt needs root privileges for real execution.
          Keep also in mind that locking is deactivated,
          so don't depend on the relevance to the real current situation!
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages will be REMOVED:
      linux-cloud-tools-4.15.0-20 linux-cloud-tools-4.15.0-20-generic linux-headers-4.15.0-20
      linux-headers-4.15.0-20-generic linux-image-4.15.0-20-generic linux-modules-4.15.0-20-generic
      linux-modules-extra-4.15.0-20-generic linux-tools-4.15.0-20 linux-tools-4.15.0-20-generic
    0 upgraded, 0 newly installed, 9 to remove and 0 not upgraded.
    Remv linux-cloud-tools-4.15.0-20-generic [4.15.0-20.21]
    Remv linux-cloud-tools-4.15.0-20 [4.15.0-20.21]
    Remv linux-headers-4.15.0-20-generic [4.15.0-20.21]                 <--- Those
    Remv linux-headers-4.15.0-20 [4.15.0-20.21]                         <--- little
    Remv linux-modules-extra-4.15.0-20-generic [4.15.0-20.21]
    Remv linux-image-4.15.0-20-generic [4.15.0-20.21]                   <--- buggers
    Remv linux-modules-4.15.0-20-generic [4.15.0-20.21]                 <--- here!
    Remv linux-tools-4.15.0-20-generic [4.15.0-20.21]
    Remv linux-tools-4.15.0-20 [4.15.0-20.21]

  but aptitude does not:

    $ LANG=C aptitude --simulate safe-upgrade
    The following packages will be REMOVED:
      linux-cloud-tools-4.15.0-20{u} linux-cloud-tools-4.15.0-20-generic{u}
      linux-modules-extra-4.15.0-20-generic{u} linux-tools-4.15.0-20{u}
      linux-tools-4.15.0-20-generic{u}
    0 packages upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
    Need to get 0 B of archives. After unpacking 178 MB will be freed.

    Note: Using 'Simulate' mode.
    Do you want to continue? [Y/n/?] y
    Would download/install/remove packages.

  Removing modules-extra seems fine for it, though!
  I have looked over all apt configs, there was no sign for me that aptitude was configured specificly to keep the images.

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: aptitude 0.8.10-6ubuntu1
  ProcVersionSignature: Ubuntu 4.15.0-21.22-generic 4.15.17
  Uname: Linux 4.15.0-21-generic x86_64
  NonfreeKernelModules: nvidia_modeset nvidia
  ApportVersion: 2.20.9-0ubuntu7
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Tue May 22 19:48:48 2018
  InstallationDate: Installed on 2017-03-05 (443 days ago)
  InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
  ProcEnviron:
   TERM=tmux-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=ru_RU.UTF-8
   SHELL=/bin/bash
  SourcePackage: aptitude
  UpgradeStatus: Upgraded to bionic on 2018-05-03 (18 days ago)

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



More information about the foundations-bugs mailing list