4

I installed Pipelight from the PPA archive, according to these instructions.

The installation command, sudo apt-get install --install-recommends pipelight-multi was for only one package, but it entailed downloading and installing about 180 dependency packages, about 40 of which were upgrades to currently-installed packages.

Therefore, about 140 new packages were installed.

Pipelight subsequently didn't work, so I removed it:

sudo apt-get purge pipelight-multi

No other packages were removed.

I then used sudo apt-get autoremove. This command removed all auto-removeable packages. There were exactly 100 of these (there were also exactly 100 packages in Synaptic Package Manager's 'Autoremovable' list).

So this left about 40 packages that weren't considered auto-removeable, and so weren't removed. I had to remove them manually.

There were no unmet dependencies on my system before I installed Pipelight; and I hadn't marked any packages as manually-installed, installed or removed anything else, or anything like that. Only about ten minutes passed between installing Pipelight and removing it.

So after I removed Pipelight, why weren't all of its unneeded dependencies marked as auto-removable?

  • Perhaps the 40 packages were recommended by other packages you had already installed; pipelight-multi caused them to be installed, but they were kept after its removal because of those recommendations. Since you've removed the packages manually it's hard to determine, but in future you can run aptitude why ${package} for each package you think should be auto-removed, and aptitude will tell you why it's being kept. – Stephen Kitt Feb 22 '16 at 9:45
  • @StephenKitt - It is really possible for an already-installed package to hijack a subsequently-installed package's dependencies and claim them for itself? – EmmaV Feb 22 '16 at 18:46
  • I wouldn't call it hijacking. Imagine package A is installed, and recommends B, but B isn't installed. Now you install package C, which also recommends B, along with its recommended packages (using --install-recommends as you did above), so package B is installed too. If you then remove C, package B would (by default) still be considered useful since it's recommended by A, and autoremove wouldn't remove it. Since the link from A to B is only a recommendation, you can still remove B without removing A and end up back in the initial situation. – Stephen Kitt Feb 22 '16 at 21:50
  • 1
    The subtlety here is that auto-removals don't track which packages caused another package to be installed. There's just a flag which marks packages as auto-removable, and such packages are removed when nothing keeps them on the system (which by default means when nothing depends on them or recommends them). – Stephen Kitt Feb 22 '16 at 21:55
3

My best guess is that the 40 packages were recommended by other packages you had already installed; pipelight-multi along with the --install-recommends option caused them to be installed, but they were kept after its removal because of those recommendations. Since you've removed the packages manually it's hard to determine, but in future you can run aptitude why ${package} for each package you think should be auto-removed, and aptitude will tell you why it's being kept.

The mechanics behind this aren't necessarily intuitive. When a package is flagged as auto-removable, either manually or automatically (in the latter case, because it's installed automatically to satisfy a dependency or recommendation), the auto-removal flag is the only information stored; the system doesn't remember why a package was automatically installed. Such packages are kept only as long as some other package depends on them, or recommends them (this is the default setting, it can be changed).

All this would explain your situation as follows. You already have some other package, A, installed; this package recommends B but the latter isn't installed. You install pipelight-multi which also recommends B; given that you explicitly specified --install-recommends, we know B is then installed along with pipelight-multi. When you remove pipelight-multi and run apt-get autoremove, B is marked as auto-removable and gets checked, but because A is still installed, B is kept, even though the package which caused it to be installed in the first place is gone. Because A only recommends B, you can manually remove B to get back to the initial situation.

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.