[Bug 1725861] Re: APT::AutoRemove::SuggestsImportant "false" should be the default
Julian Andres Klode
julian.klode at gmail.com
Sun Oct 22 10:46:00 UTC 2017
Users have in the past "accidentally" removed entire desktops ("I
installed this package, now my desktop is gone and I can't use my PC
anymore"). They often just hit enter and don't really read what apt is
going to do.
aptitude does autoremoval by default in any install/remove/upgrade/etc
operation
SuggestsImportant was set to true in 2011 with 0.8.15.3. It's been that
way for 6 years, 3 LTS releases. I feel like it's a bit late to change
that back now.
Also, just setting SuggestsImportant to false will not really help - you
might still get a different result in your example. Any dependency on a
virtual package or an or group will keep _every_ installed package
satisfying that dependency installed. So install A depending on B | C |
D, install packages needing C and D, remove the latter packages and C
and D will still be kept around.
So my personal autoremoval script (which based on pseudo boolean
optimization to mathematically ensure the smallest possible system based
on manually installed + depends + recommends) would currently remove 42
packages, autoremove only 24.
In my opinion, for careful people like us, I do agree that the Suggests
handling is bad (after all, my script also does not treat Suggests as
important). But I don't fully trust normal users with that, given what
we've seen in the past with some not reading what apt is going to do and
then complain afterwards that their entire desktop was gone.
A reasonable compromise here would be to easily give the user the
information that they can remove even more packages:
* Keep autoremove SuggestsImportant
* Add a new option to autoremove and co like --autoremove-more that sets SuggestsImportant to false
* When running autoremove, show "The following packages could also be removed, but might enhance other installed packages. Use --autoremove-more to remove them" and a list of packages that are only kept by Suggests (and preferably list which package(s) are suggesting them).
Now the enhances might be confusing in the wording, but we eventually
want to also have the autoremover respect Enhances, but Enhances is more
complicated since it's the other way around. But it does explain the
situation.
Finally, I'd like to hear what DonKult has to say, given that he turned
that on in the first place.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1725861
Title:
APT::AutoRemove::SuggestsImportant "false" should be the default
Status in apt package in Ubuntu:
New
Bug description:
After an upgrade to 17.10, I took a look at how much cruft I had
accumulated on my system, and started marking various packages 'auto'
which I know I don't care about keeping installed.
apt autoremove didn't remove nearly as much stuff as I expected, and
as I dug down into some of them I found that a number of them were
being kept because other packages on the system have Suggests:
referencing them.
This is asymmetric and wrong. If Suggested packages are not
automatically installed by default, then a Suggests should also not
prevent a package from being automatically removed.
After a web search led me to 'https://askubuntu.com/questions/351085
/how-to-remove-recommended-and-suggested-dependencies-of-uninstalled-
packages', I set 'APT::AutoRemove::SuggestsImportant "false"' in my
apt config; apt autoremove now wants to remove 365MiB of packages from
my system. That is a LOT of cruft that has accumulated over the years
of upgrades, none of which I have ever asked to be installed and all
of which were universe or no-longer-available packages.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1725861/+subscriptions
More information about the foundations-bugs
mailing list