[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFC: A new approach to autoremoval



On Wed, 14 Feb 2018 10:01:40 +0100, Julian Andres Klode wrote:

> Hi all,
>
> I'd like to make a few changes to how autoremoval works. Some
> of that has been discussed on IRC, but I think I have now reached
> a proposal that is coherent as a whole.
>
> # Automatic autoremoval
>
> Operations such as install, dist-upgrade, remove should automatically
> remove unused packages, especially kernels [1]. This works similar
> to how --auto-remove works now, but is restricted to a safer subset.
> A package qualifies for safe autoremoval if:
>
> (1) It is in a section marked as APT::SafeAutoRemove.
>
>     The sections enabled by default are oldlibs and kernel.
>
> (2) It became unused as part of the command being run.
>
>     This is consistent with unattended-upgrade's Unattended-Upgrade::Remove-New-Unused-Dependencies
>     option, which is enabled by default, and is generally the way higher-level tools are
>     migrating to.

IMO APT already provides the install, dist-upgrade and remove commands
with the right
semantics and people are also used to those semantics. Apt already
reminds users about
unused packages and within the scope of those commands this is the
best it can do, thus I would
not change the behavior.

I would be unpleasantly surprised if apt install hello which is
expected to finish in a couple seconds would also start removing
kernels and updating initramfses delaying whatever I wanted
to do next. IMO apt should keep the commands it provides simple and
stable letting complex logic
be carried in upper level layers.

The problem of systems collecting a huge number of unused kernels and
obsoleted libraries
IMO does not arise on systems updated using apt, because apt does
excellent work in reporting
the unused packages and people running apt act on that.

Systems running unattended-upgrades are running unattended collecting
unused packages, but
the u-u-side fix is fairly simple [3] and will resolve the issue for
good without any change required on APT's side.

I observed a third class of systems which collect unused kernels, ones
that are set up for and operated by people who are not very
experienced in resolving computer issues and just told to accept all
the updates when the notification pops up. For those systems I plan
implementing
a solution similar to the one which is on review for u-u [3].

>
> [1] https://bugs.launchpad.net/bugs/1734104

I continued the discussing in the bug tracker, the short version of my
opinion here is that apt is good as it is now.

>
> # Harder autoremove command
>
> If we enable safe autoremovals like that, we can make the autoremove
> command perform a harder autoremoval, essentially behaving with
> Suggests-Important set to false [2].
>
> [2] https://bugs.launchpad.net/bugs/1725861

IMO this would just add complexity and make users more confused, thus
I'd drop that request, too.

Cheers,
Balint

[3] https://github.com/mvo5/unattended-upgrades/pull/97


Reply to: