Pkgfile marked as orphaned

Today I searched for orphaned packages in pamac. I was shown pkgfile 21-2 as orphaned. Research showed that “pkgfile is a tool for searching files from packages in the official repositories”. Dependencies include pacman. Shouldn’t this be kept instead?

orphaned does not mean obsolete - indiscriminately removing orphans may remove wanted files.

1 Like

It depends on pacman, it is not that pacman depends on it.
You probably have octopi installed. This was a dependency of it. But the current octopi does not start so i guess it will soon be updated again. I would not delete it just yet. Or maybe just mark it as explicitly installed.

1 Like

Why random? I find out beforehand whether it is safe!

I have no idea what you are talking about.

Yes, I mark it as explicitly installed, but octopi was never installed here. This installation has only been around for a week and is almost in virgin state.

Sorry, mistake from DeepL, I did not mean random but indiscriminately removing.

With all my respect, an orphan is dependency that is left after removing the main package X. It should in theory be useless space eater if package X is removed. If in the practice package Y depends on the orphan, the the package maintainer of Y did not do his job to mark the “orphan” a dependency of Y.

If you remove a package using -R it will remove only that package but not packages it depends upon.

In such case the packages not removed will be marked as orphans.

If you want to make sure you are removing all - dependencies included - use -Rns (you could include --cascade but that would likely remove more than you expect)

2 Likes

I agree, but since I’m not sure if this is sloppiness or necessity, pkgfile remains for now. I guess it shows that no one is infallible.

I already realize that, thanks for elaborating. But this is a 1 week old minimal installation of Manjaro KDE. Minimal because I do not want to uninstall 1kg bloatware first. So I can’t explain what the pkgfile should be left of. But well, I know now, thanks for your help @linux-aarhus and @Teo and have a nice weekend.

You can if you like the command not found feature. However, It’s unmaintained and redundant. It was created before Pacman improved as far as the local file database.

If you do remove it, you’ll want to do the following:

systemctl disable --now pkgfile-update.timer
sudo pacman -R pkgfile
sudo rm -rf /var/cache/pkgfile/

Then enable pacman-filesdb-refresh.timer:

systemctl enable --now pacman-filesdb-refresh.timer
5 Likes

Thank you @Yochanan :ok_hand:

Just some extra clarification. The s there grabs dependencies that are no longer required by any package … the n is for removing ‘save files’ as well.
For example … if you move to using dracut instead of mkinitcpio and remove mkinitcpio with -Rs it will remove all packages as described but will leave certain configuration files you may have augmented such as /etc/mkinitcpio.conf.pacsave.

What improvements?
I’m pretty sure I recall it being mentioned that pkgfile was redundant at the time it was ‘released’ (onto the manjaro populace). Not to mention causing a number of headaches … like breaking updates and significant input lag.
pacman -Fy and such hasnt changed much as far as I know.
I suppose that timer might be new … but it just does pacman -Fy weekly.

The only remaining question is where pkgfile comes from in an almost new Manjaro minimal installation. As already said, no Octopi has been installed.

It has nothing to do with octopi.

And it being included? Bad decision at the time (years ago) … but apparently finally reversed now:

1 Like

The cashed repo files in /var/cache/pkgfile/ were more than 400MB btw. So it is nice that it is away.

Things? And stuff? I’m worn out, don’t make me do more research and think. :stuck_out_tongue_closed_eyes:

I honestly don’t remember now, it’s been so long. Note there has been no upstream development for almost three years–there’s a reason for that. I guess it was trying to solve a problem that didn’t exist to begin with?

Either way, pkgfile is purged from anything Manjaro related–though it’s still in the Arch repos gathering dust.

Not anymore. :wink:

Oh … nice nab then.
I really had no idea octopi was depending on pkgfile (also in the AUR). Didnt even think to look.
I also wonder why it ever did… oh wow. Since back in 2013.
“Well when your memory goes … forget it.”

1 Like

Comments

  1. Running pacman -Fy or pkgfile -u updates /var/lib/pacman/sync/*.files. However their content might not reflect what is on your system in /var/lib/pacman/sync/*.db but rather what is on the repos. This might cause confusion. The only time I’d run those commands is after I did a pacman -Syu (or pacman -Sy, but don’t do that :slight_smile: ). I know the man page for pkgfile recommends a daily cron job and I guess if you are looking for a file that doesn’t yet exist on your system this works, but at this time, I think .files should reflect the contents of .db in /var/lib/pacman/sync.

  2. I removed pkgfile because pacman has pacman -Fx <file_regex>. It answers the question: Which package owns this file that is on my system.

Those on KDE, where zsh is installed, I noticed manjaro-zsh-config depends on pkgfile.


Question

  1. On a fresh install of the XFCE ISO, pkgfile is in the file /rootfs-pkgs.txt (part of the ISO installation), but it is not in gitlab Packages-Root and I could not find a commit that removed it. In gitlab, I clicked History and view recent titles and content. Where do I find where it was removed from /rootfs-pkgs.txt?

    rootfs-pkgs and desktopfs-pkgs are still valid and at gitlab the urls are:
    profiles-and-settings/iso-profiles/manjaro (desktops specific) and profiles-and-settings/iso-profiles/shared (all desktops).