Page 1 of 1

apt autoremove

Posted: Fri Feb 23, 2024 5:04 pm
by fredx181

There was a discussion about apt autoremove (not removing all dependencies) in the BookwormPup64 thread and @dimkr suggested a fix (I tested and works OK for me) viewtopic.php?p=111942#p111942

Say you install a package that also installs a lot of dependencies, and later you decide to remove it.
Expected IMO when you do apt autoremove after removing that package, all these dependency packages will be also removed. Unfortunately this is not always the case.

Fix: (will remove most orphaned packages then when doing apt autoremove)
echo 'APT::AutoRemove::SuggestsImportant "false";' > /etc/apt/apt.conf.d/99nosuggests

But this is really a matter of preference, you may not have a problem at all with leaving some orphaned software in the system, as it cannot harm (will only take some space).

EDIT; Also this may help for autoremove (untested):
echo 'APT::AutoRemove::RecommendsImportant "false";' > /etc/apt/apt.conf.d/99norecommends