You are not logged in.
Hello,
I'm just wondering if the orphan detection is not working as it should.
Example:
I install jdk10 with pacman:
pacman -S jdk10-openjdkThis will install:
jre10-openjdk-10.0.2.u13-1
jre10-openjdk-headless-10.0.2.u13-1
jdk10-openjdk-10.0.2.u13-1
So it is clear that the two jre packages are dependencies of the jdk package.
After installation I remove the jdk10 package again:
pacman -R jdk10-openjdkThis will remove the jdk package only.
Now I try to list the orphan packages (since the two jre packages were installed with jdk and now jdk is not available anymore, I assume that they are orphans):
pacman -QtdBut this gives me an empty result.
My question: Do I something wrong here?
If this is normal behavior my system will blow up quite fast if I install a package just for testing and then I want to remove it completely with everything what was installed with it.
Thanks in advance.
Offline
That's because jre10-openjdk-headless satisfies the java-runtime-headless dependency of some of your packages. Even though you have another package that satisfies the same dependency, pacman has no way to know which one you intend to use.
Offline
Thanks @arojas for your reply.
That means if the java-runtime-headless is installed all the different versions will not be detected as orphans. And there is no way to tell the package WHO (which other package) was causing the install.
Is there maybe any other method instead of using pacman to clean up the system. Or is there a possibility to install packages only for testing and then UNDO the installation?
Offline
What about simply remembering what you installed for testing and removing that after it isn't necessary anymore? This is a very specific case with a very specific packaging process where the usual orphan heuristic fails. Check the pacman log where you can see and specifically react to complete installation transactions and simply remove them if this is something you are doing often.
Offline
Be aware that there are two kinds of dependencies, "required dependencies" (just labelled as dependencies) and "optional" dependencies. Optional dependencies are not installed by default. You can view them with "pacman -Qi <package name>" and install them with pacman -S --asdeps <package>. pacman -Qdt lists the packages that are not a dependency (required or optional) of another package. What has happened is likely that the additional installed packages were also optional dependencies of other packages; you can inspect them with pacman -Qi <package name>. You can list packages that are orphaned in the sense that they are not a required dependency of other packages with pacman -Qdtt. The information about what package had installed what is not present in the database, but you can find this information by inspecting /var/log/pacman.log
Offline