Longtime Manjaro users: do you check for orphans?

I have started running pamac list -o before and after an update. Each update generated an orphan or two. I reviewed and determined they were not needed on my system and could be removed.

For example:

update 1 - orphans

  1. metis
  2. rest

update 2 - orphans

  1. wayland-protocols

Planning for the future, I can imagine over time, that the number of orphans could grow if not checked. I plan on continuing the review of orphans before and after an install. I have no problem or technical question, thus the Category chosen.

My question, is this something longtime Manjaro users do and is it one or two packages occasionally?

1 Like

I also keep mine uninstalled, also checking around update time, or basically whenever I feel like it. And I’ve had no problems, really.

I usually check for orphans every now and then. And as you do, I usually evaluate them and then uninstall everything that is not needed.
I sometimes also go through the packages installed and uninstall things I don’t need anymore

when i remember or i’m doing other stuff like pruning journals etc I have

alias orph='pacman -Qdtq'

and

alias rmorph='pacman -Rs $(pacman -Qdtq)'

after inspection with pactree if needed.

1 Like

You should have made use of the poll feature …

Sure I check for orphaned packages and remove any and all I’m not wanting to keep…
Btw. that’s also mentioned bot the arch wiki

https://wiki.archlinux.org/title/system_maintenance#Check_for_orphans_and_dropped_packages

and the Manjaro wiki:

I do not do it each time, but I do clean up orphans and foreign packages once in a while.

Orphans are (normally) useless packages, so it just takes space and bandwidth for nothing. It’s really unusual when something actually useful is marked as orphan; if it happens, you can mark the package as explicitly installed of course.

Foreign packages might be a sign that you have obsolete packages that won’t be updated in the future, so it’s a good idea do deal with them too. Most recent example (as like, right now) is dbus-x11, which is a variant that provides DBUS (which is, hum, a pretty important component for most if not all Manjaro systems out there) that used to be in the official repos, but isn’t there anymore: so you have to take a decision to either move on to the dbus package or to use the AUR, which has a package with the same name. To be honest, with such a core package, I would recommend to avoid AUR and move to dbus provided from the official repositories.

Between orphans and foreign packages, I think the latter is the one that requires most attention.

…or you could use a Pacman hook. :wink:

/etc/pacman.d/hooks/orphans.hook:

[Trigger]
Operation = Install
Operation = Upgrade
Operation = Remove
Type = Package
Target = *

[Action]
Description = Checking for orphaned packages...
When = PostTransaction
Exec = /usr/bin/bash -c "/usr/bin/pacman -Qtd || /usr/bin/echo '=> No orphans found.'"
2 Likes

Besides removing occasional packages moved to AUR, i don’t.

You also have

yay -Yc

or

paru -c

I check almost every update and remove them. Cleaning regularly let you see what has recently become an orphan, if you wait too long you have too much packages to sort and remove or keep (sometimes package become orphan because it was pulled as a dependency of a package, which is no longer a dependency of that package, but you still want to have this now orphaned package so you set it as “explicitly installed”).

It is also a good idea if you enabled the AUR in Pamac, to check after every update for foreign packages, because packages dropped from Manjaro, can be in the AUR with same name, and then Pamac updates the package from AUR, when you probably should have removed it (or not, same as orphans, in some case you may want to keep the package and so having the AUR version now).

2 Likes

Weird, I have created a poll in the past, but this time I got an error. Oh well.

An error occurred: You are not allowed to create polls.

This is what I would have created.

### [u]How often do you check for Orpans?[/u]
[poll name=OrphanCheck]
- Once a week
- Once a month
- Once a year
- After every update
- Whenever someone mentions orphan in a new topic
- Never
- What are orphans
[/poll]

***

pacman -Qtdq

1 Like

Yeah, um, ceph-libs :grimacing:

All great responses. Thank you.

In addiition to @Alfy alias fo orphans, I think I’ll add another for foreign packages pacman -Qm. I can see how that list can grow over time.

I was corrected by a colleague that I shouldn’t say, “the package was moved to the AUR”, but rather “the package was removed from the Manjaro repositories and it just so happened to be in the AUR”.

A while back qpdfview was removed and it seems like quiterss was recently removed. They are both in the AUR. When I first installed, I installed from the AUR: skype, chrome, and notify-send, but the list has grown to include:

gcolor2
gnome-icon-theme
gnome-icon-theme-symbolic
ipw2100-fw
ipw2200-fw
manjaro-firmware
qpdfview
qt5-webkit
quiterss
upd72020x-fw

I’ll probably leave quiterss and qpdfview for the time being, but I recently saw a post that said it’s okay to remove manjaro-firmware. I have been looking for ways to catch these preemptively. Of course the Annoucement, but I was wonder if the gitlab commit list(s) would be helpful. For example, iso-profiles commit list.

I turned the command below into an alias. It covers both Foreign and Orphans. So I don’t have to count, I pipe the output from the pacman commands to tee to display the output on the terminal and pipe to wc.

echo "= AUR Foreign =";pacman -Qm|column -t|tee /dev/tty|wc -l;echo "= Orphan =";pacman -Qdt|column -t|tee /dev/tty|wc -l

I have done in the past, and a couple of times I’ve nuked the lot and gotten away with it. Normally I leave them alone though as I’m not all that sure about the consequences of my actions. :grinning:

Oh well. I just nuked all my orphans again. Going to reboot and see if the system is ok. I hope it is.

Why wouldn’t it be? Orphans are packages installed as dependencies, which no other package uses anymore…

I envy your expertise. I’m a noob. Only been using Linux for 2.5 years and still have much to learn.

Everybody is - but the knowledge is right infront of you and you just have to be willing to learn it.
Links to wikis explaining orphans were already given in this thread: just read up if you’re willing to do so.

I thought the same, too and uninstalled all orphans until I found some “orphans” still having a function, see example below. Since this time I only uninstall “orphans” I’m 100% sure they are obsolete, which is not easy to evaluate, sometimes. Usually, they don’t take a nameable amount of ressources to spend much time on this decision.

Hi. Thanks for your lecture oracle.

I’m actually learning a foreign language at the moment and have been for 2 years. Prior to that I learned sufficient to use linux, so I’m alright jack. To keep you happy I’ll come back and learn more about linux in future.

And as Wollie has just mentioned, I am sure I noticed in the past that some orphans were still relevant to stuff I actually use.