I'm using Debian stable and I really don't install much on it, but I'm starting to notice that whenever I happen to not use my system for a while Debian tends to add packages to autoremove.

Packages that come with the default Debian system like Network Manager, wpa_supplicant, java, and etc all show up in the autoremove. I'm clueless to why it does this, I don't install any packages outside the default repository.

It gets rather frustrating to see that I need to repair my system whenever I notice that I accidentally autoremoved something. I don't uninstall any of the default packages that come with the system either. My question is what exactly is causing Debian to want to put packages up for autoremove ?

  • Only Ubuntu and official flavors of Ubuntu (ubuntu.com/download/flavours) are welcome here, refer to askubuntu.com/help/on-topic where you'll find other SE sites where you question will be welcome if you don't want to use a Debian forum. – guiverc Mar 27 '20 at 0:49
  • 1
    I am confident this also applies to Ubuntu systems. – smoe Mar 27 '20 at 0:55
  • @guiverc Ubuntu is built off Debian sid so I thought it would be okay to post this here seeing that others posted debian related questions here. There's even a tag available – PrimRock Mar 27 '20 at 0:59
  • Yes debian-sid is 'upstream' of Ubuntu, though many packages on my 20.04 system are newer than the debian-sid box next to me (many much newer so newbies probably miss how it works in real life). The tag is used for the debian packages (debs), but tags can be created easily and mean little. Your question as written is off-topic; and yes the reason is the same - package rules, but how that detail is looked up (via web anyway) differs of course. – guiverc Mar 27 '20 at 1:08
  • So far on Ubuntu I have only noticed it wanting to removed old kernel packages and not any of the default or installed packages. Would imagine that Debian also has similar workings, but don't know debian so it is better to have Debian people look at this. – crip659 Mar 27 '20 at 1:09

Default packages on your system are often not installed individually but dragged in as a dependency to a "meta" package. When you have removed that meta package, you favorite package manager must assume that you have no interest in what was installed only to make that meta package happy.

For instance have a look at kde-standard (of my Ubuntu machine):

apt-cache show kde-standard
Package: kde-standard
Architecture: amd64
Version: 5:100ubuntu2
Priority: optional
Section: universe/metapackages
Source: meta-kde
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 21
Depends: akregator (>= 4:17.08.3), ark (>= 4:17.08.3), dragonplayer (>= 4:17.08.3), gwenview (>= 4:17.08.3), juk (>= 4:17.08.3), kaddressbook (>= 4:17.08.3), kate (>= 4:17.08.3), kcalc (>= 4:17.08.3), kde-plasma-desktop (>= 5:100ubuntu2), kde-spectacle (>= 17.08.3), khelpcenter (>= 4:17.08.3), kmail (>= 4:17.08.3), knotes (>= 4:17.08.3), kopete (>= 4:17.08.3), korganizer (>= 4:17.08.3), kwalletmanager (>= 4:17.08.3), okular (>= 4:17.08.3), plasma-dataengines-addons (>= 4:5.10), plasma-pa (>= 5.10) | kmix (>= 4:17.08.3), plasma-runners-addons (>= 4:5.10), plasma-wallpapers-addons (>= 4:5.10), plasma-widgets-addons (>= 4:5.10), polkit-kde-agent-1 (>= 4:5.10), sweeper (>= 4:17.08.3)
Recommends: konq-plugins (>= 4:17.08.3), plasma-nm (>= 4:5.10)
Suggests: skanlite
Breaks: kde-minimal (<< 5:57)
Filename: pool/universe/m/meta-kde/kde-standard_100ubuntu2_amd64.deb
Size: 2096
MD5sum: c695504c343f43d52d27d2d2a7afb1c6
SHA1: 309939b0aa4925fe8abde6405cc8e610cd514a7d
SHA256: 93ba353ff7f6fc0d6994fafaab5a49bc2ddbdaa157eb9d7174ae7ef2a6a70558
Homepage: http://www.kde.org
Description-en: KDE Plasma Desktop and standard set of applications
 The KDE Software Compilation is the powerful, integrated, and easy-to-use Free
 Software desktop platform and suite of applications.
 This metapackage includes the KDE Plasma Desktop and a selection of the most
 common used applications in a standard KDE desktop.
Description-md5: 22b1a1d202f3643155a96f5ad211c0fb

If removing kde-standard, then you are likely to remove your favorite kcalc, too. kde-plasma-desktop likely was also installed directly so this would not be offered for autoremoval.

  • The thing is, I don't recall ever removing anything from my machine that was a meta package. The only way I can see this probably happening is if I installed something that didn't come with the default distro, and that package happened to have dependencies that was a meta package of a default package that came with my distro. I'm not sure if removing packages with purge can cause this. Can it be ? – PrimRock Mar 27 '20 at 1:19
  • Yes, removing packages that your metapackage depends upon will indeed orphan lots of other packages, making them eligible for autoremoval. That's the classic way to get packages removed unexpectedly. ALWAYS read your apt output thoroughly before agreeing to removals. – user535733 Mar 27 '20 at 2:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.