You are not logged in.
I want to check the owner of certain dirs with Pacman -Qo and I get the list of all packages.
But how can I then reinstall every package listed there?
I tried with
pacman -S $(pacman -Qo /xyz/)but while it tried to reinstall those packages, there were loads of errors with 'target not found' as it didn't quite get it.
Obviously I'm doing it wrong, so I want to learn this. Thanks.
Last edited by maboleth (2025-01-09 00:37:55)
Offline
Look at the output of -Qo, you'll see it has more than just the package name (it includes the version). Passing all of that to -S will cause the problem, because there is no package name that matches that version. You need to add --quiet (-q).
Offline
Look at the output of -Qo, you'll see it has more than just the package name (it includes the version). Passing all of that to -S will cause the problem, because there is no package name that matches that version. You need to add --quiet (-q).
Thanks. That did the trick and removed everything with only package names being displayed, but it couldn't actually reinstall them.
I got:
warning: tar-1.35-2 is up to date -- reinstalling
warning: texinfo-7.1.1-1 is up to date -- reinstalling
warning: tinysparql-3.8.2-2 is up to date -- reinstallingThat's just as an example. But it didn't actually download those packages.
Offline
Of course it didn't download the packages. They're already in the cache, so no need to download them again. That doesn't mean it didn't reinstall them.
Offline
I cleared the cache with pacman -Scc, but got the same message afterwards.
I then tried to randomly select a single package from that list and install it with "pacman -S xyz" and it actually downloaded and reinstalled the package, populating the missing files.
I guess I'm still not doing something right.
Offline
Why in the world did you clear the cache? You just wanted to waste bandwidth on the server for no reason at all?
You haven't posted a single error. If there's a problem, post a complete log.
Offline
what are you trying to do? this sounds like a X/Y issue, what is your original goal
Offline
Found the cause.
Apparently I had 1 aur package that was absent so an 'error' on that part meant that even though pacman displayed 'reinstalling' on everything else - it didn't actually reinstall because of that missing aur package.
Now works as should.
Thanks everyone. I wanted to add all missing files that I deleted from the listed packages. It was mainly educational purpose.
Offline