I'm using Crunchbang Linux on my laptop. I noticed a strange behavior of the package manager: when installing a package from the official repo (libdirectfb-extra in my case) apt told me that a bunch of packages were no more needed (including xflux, obconf, obmenu and other applications that I use frequently). I proceeded to the installation of the package, but then apt removed all the packages that it said to be not needed.

What does it mean? Why does it happen? I don't update the system very frequently, is that the cause?


It depends on whether your explanation is accurate.

If it simply said they'll be removed then they were removed due to dependency conflict

If it said they are no longer needed then they were installed via a dependency (e.g., gnome-desktop depends on a ton of packages) and the dependent package had been removed. When that happens all of the dependencies are seen as "can be removed" because they weren't explicitly installed.

Why were they removed? The most likely reason (if you're using apt-get) is that the --auto-remove flag was passed, at some point apt-get auto remove was run or the APT::Get::AutomaticRemove config option is set. Run apt-config dump | grep APT::Get::AutomaticRemove to check.


a package"foo" might depend on another package "bar". this means that you cannot install "foo" without having "bar" installed.

the task of a package-manager is to make sure, that the package "bar" is installed if the user requests to install "foo".

now modern package-managers will also keep a record of each package, whether it was installed manually (because the user requested this package to be installed) or automatically (because the user requested another package to be installed, which in turn required this package).

if the user uninstalls package "foo", the system might discover that "bar" is no longer needed on the system (the only reason to have "bar" on the system was that "foo" required it; now that "foo" is to go away, "bar" should probably go away too).

this should guarantee that your system does not get overly bloated with packages you don't need.

sometimes things are a bit more complex. imagine "foo" depends on "bar"...but then a new and updated version of "foo" depends on "baz" (and doesn't need to old "bar" at all). what happens when you upgrade "foo"? it will install the new "baz" package and it will remove the automatically installed "bar" package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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