Discussion about handling orphaned packages

That’s right, orphans should be carefully reviewed before being removed. Certain things can cause useful or needed packages to become orphans, in which case they should be marked as explicly installed (sudo pacman -D --asexplicit [package name])–not uninstalled.

Check out these threads, where removing all the orphans would have removed a lot of needed packages:

Most orphans come from uninstalling a package and leaving dependencies behind, but as you can see it is not always so cut and dry. In my opinion orphaned packages should be examined with the same careful consideration a .pacnew file would get. Ideally the user would determine what the package is and why it has become an orphan, then decide if it is something they need to keep or not.

The main point I was trying to make is recursively removing packages (such as with pacman -Qtdq | pacman -Rns - ) is much more aggressive than people probably realize because it can include optional dependencies for other packages. If you’re not careful you can throw the baby out with the bathwater.

6 Likes