Calibre regarded as Orphan

Continuing the discussion from Are 106 orphaned packages a likely number?:

I have started to explore pacman a little deeper and am confronted with cleaning up orphans atm. The linked Topic is my entrypoint here.

Looking a little more thoroughly into what pacman -Qtdq presents to me as orphaned packages I am a bit undecided how to treat this.

According to the Arch wiki Orphans are

"packages that were installed as a dependency and are no longer required by any package.

At least one of the 106 hits (calibre) makes me doubt the findings are reliable and likewise save to remove.

what pacman -Qi calibre tells me is at least in line with the listing

...
Required By     : None
...
Conflicts With  : calibre-common  calibre-python3
...
Install Reason  : Installed as a dependency for another package

It seems very unlikely that calibre (the eBook Reader/Manager) was installed as a dependency for something else and not just for it’s own purpose to manage eBooks though.

Most of the other listed orphan packages don’t tell me much, so it’s hard do judge whether it’s save to remove them or not.

So, 2 concrete questions result from this

  1. would you generally question or trust pacman -Qtdq findings?
  2. is there any way to do away with the false categorization? I tried to explicitly reinstalling calibre (sudo pacman -Syu calibre) but that does not make any difference
  • I just found a button (“mark as explicitly installed”) in the pamac GUI. maybe that’s the way to treat this

another suspicious case is cockpit-dashboard which depends on cockpit instead of being a dependency for cockpit (which is being installed)

Hi @vrms,

I’ve never used pacman for removing packages. Be they orphans, or not.

Instead, I use pamac. To get a list of current orphan packages, run:

pamac list --orphans

You can then go through the list of orphans as you wish. To remove/uninstall all orphans, use:

pamac remove $(pamac list --orphans --quiet)

The --quiet flag just supresses the version numbers, which thee first command doesn’t do.

I have never had a problem of the wrong orphan being removed.

I like using pamac instead of pacman, even in CLI. It just feels as if there’s a lot less that can go wrong. For more information, see:

man pamac

Hope this helps!

2 Likes

thx for the suggestion.

On first sight I see the same results with pamac list --oprhans (listing packages as orphans which to me seem unlikely to have been installed as dependencies as well as the cockpit-dashboard vs cockpit situation described in my second statement).

so I wonder whether that makes any difference. I never pondered upon wheter CLI pamac would be preferable over pacman. You seem to think so.

I’ll investigate on this a bit. If you feel like elaborating on why to go for cli pamac instead of pacman I’d be happy to hear about your reasons.

My reason gets hate. But I’ll give it nonetheless:

pamac is developed by Team Manjaro, for Manjaro. So it just makes sense that less goes wrong when using it. And with updates it’s recommended in the announcements that pamac is used, rather than pacman because it just takes care of more things so therees less that I can do wrong.

But this’ll probably get some hate, but I’m used to it by now. But that’s my reason.

For more info: Pamac - Manjaro

1 Like

No need for this complicated command to remove all orphans. Simply use

pamac remove -o
1 Like

While I can’t find anything in repositories depending on calibre, you might have installed something from aur.

If you check man pacman you’ll find there is pacman -D for database manipulation (--asexplicit, --asdeps, etc)

1 Like

my point/problem here is not so much on how to remove packages regarded as Orphans. My problem is rather to be sure the findings are correct and I am not removing anything that actually may still be needed (as a dependency) or wanted (i.e. calibre). Calibre here is just an example of a package that is regarded being an Orphan by pacman/pamac but actually is wanted as an independent program).

And, as I see some mistakes (i.e. calibre, which I can easily handle because it is recognizable/obvious) I am wondering whether any of the other Orphan packages (of which there are 106) which are not recognizable to me, may just like Calibre, still be needed even though being marked as orphan.

As I said, it most probably isn’t a mistake. One way to go about this is to check /var/log/pacman.log and see what packages were installed along calibre and when, etc. This works for AUR if you are using yay AUR helper at least. I’m not sure if you are using pamac, check pamac.log or whatever. :stuck_out_tongue:

That’s “the point” of orphans - they aren’t needed by anything.

This is where you as an owner of your system come into play - you have to decide if you want something or not by actively looking through it, ie. maintaining system. And if you can’t recognize something, even after checking description, then you probably don’t need it. You probably don’t need 20% of explicitly installed packages tbh.

I understand what your problem is. My answer was more directed to @Mirdarthos , trying to let him know that an easier command can be used to remove all orpans.

Regarding your problem, to get a proper solution, you need to go through every package and see if you really need it or not. Being marked as orphan simply means that no other package depends on it and the system should not break if you uninstall all of them. Should you later find out that you do need a package, you can always install it. No real harm done.

I also like a clean system and did got through all the orphans on my system and removed most of them. I found that some of them where needed for my desktop to run properly, so I marked them as explicitly installed. I removed the others. Before I started this cleanup, I did make a backup, though, just in case sth. bad happend during the removal that couldn’t easily be fixed by reinstalling the pkg again.

Once I was finished with this, I went though the list of explicitly installed packages and removed quite a few of those as well. I got rid of stuff I don’t use. I also managed to get rid of all lib32 libs and packages, so my system is 64 bit only. So I’m currently down to 1318 packages, with 322 of those marked as explicitly installed. The less stuff is installed, the less can break, the less needs updating, … There are still probably quite a few packages that I could get rid of, and I might do another round of cleanup in the future, but for now, I’m mostly happy.

Thank you, and yes, that is easier. I know. I kind of forgot that the -o flag can be added to pamac remove.

That said, as explained by @fabby, it is better to use the long option, so --orphans instead of -o, when giving instructions online. Especially to someone not yet familiar with the terminal. Because it is more verbose. So I try to be as explicit as possible. So, in this case, I’d say the command would be:

pamac remove --orphans
1 Like

I never understood why Applications themselves can be considered to be Orphans instead of stand alone Programs Users want to be to be installed. Things like Libraries should be the ones treated as Dependencies.

Because they can technically be. Let say I want to use some kind of audio plugin, or some PDF tool, like totally random example, let say we want to install fanrficfare it requires calibre. You don’t want fanficfare anymore, then what about calibre? You keep it because it is a program and not a library?

If you want to install a program it will not be an orphan later on, it will not be installed AS A DEPENDENCY for another program, but AS EXPLICITLY INSTALLED (unless you install something else along with it and it is treated as a dependency, in which case you just make it explicitly installed afterward by clicking the button in Pamac).

I have seen rare case where a bunch of packages became all orphans (like most of them), this case exist but it is really rare (seen it once or twice), this is a bug. That some packages not needed anymore become orphans is perfectly normal in my opinion it makes sense.

1 Like