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

Bug#559194: Unused automatically installed packages don't get removed on upgrade



On Mon, Mar 28, 2011 at 22:20, Uwe Storbeck <uwe@ibr.ch> wrote:
> On Mar 26, David Kalnischkies wrote:
>> I wouldn't consider this a bug in APT and co as its way easier to
>> break your system than it is useful in helping cleaning up…
>
> apt knows when a package is obsolete and not used anymore. So it
> could remove those packages with no harm to the system.

No. APT doesn't know for sure that a package is obsolete or unused.
sensible-utils for example doesn't have that many packages depending
on it simple as it provides functionality for a user but not really for
other applications. So is it unused now just if all packages depending
on it are gone? It can only guess and therefore asks for confirmation.
(Or does many packages fail to depend/recommend/suggest on it?)

Obsolete is another think: What makes a package obsolete?
A package which isn't installable from a configured source any more you
might think, but what about all these packages a user might have installed
by hand with dpkg? And is it 'obsolete' because its superseded by something
else or is it just not maintained any more?
Oh, and what about temporary removes from (certain releases) of the archive,
or any other removal which might happen in testing because of transition
fixing or release critical bugs…

Possibilities are endless.

You can apply certain heuristics, but they will fail in one or the other
case and that the autoremover will remove a still required 'required'
package is much more likely than a valid removal:
And much more likely to cause a lot of trouble…

Oh, and btw: As you have the 'required' packages installed by the
installer they will be not marked as automatically installed anyway,
so even if APT would look at them, they would be manually installed…

> Debian has a good reputation for long term stability and
> upgradability. That's why there should be a standard mechanism to
> get rid of old, obsolete packages which are not used anymore,
> even when they have been required for the system at some point.
>
> I do not say that apt and co have to handle this case. It also
> could be handled by another mechanism (e.g. by transitional
> packages which reduce the priority when a packages is not
> required by the system anymore). But it should be handled at all.

Common pratice is it to place a package in 'oldlibs' section as it
will be grabbed by deborphan then. You can switch the priority, too,
and the description should be changed.

After all: If we ignore the problem above, the autoremover would
compute that it can remove the package - every sane user will check
what the package does before accepting the remove and he will be
confused by a 'required' package which properly has a very important
sounding description. If its priority extra, being in oldlibs and
the description says something about a transitional package,
it is way easier to hit 'yes'…


Best at last: Now that support has landed in squeeze APT and
dpkg for 'disappearing packages', try this to avoid the transition
package mess alltogether.


Best regards

David



Reply to: