You are not logged in.

#1 2025-01-09 00:09:08

maboleth
Member
Registered: 2020-01-03
Posts: 230

[solved] How to install packages that I got listed with "pacman -Qo"?

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

#2 2025-01-09 00:11:10

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: [solved] How to install packages that I got listed with "pacman -Qo"?

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

#3 2025-01-09 00:17:38

maboleth
Member
Registered: 2020-01-03
Posts: 230

Re: [solved] How to install packages that I got listed with "pacman -Qo"?

Scimmia wrote:

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 -- reinstalling

That's just as an example. But it didn't actually download those packages.

Offline

#4 2025-01-09 00:18:56

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: [solved] How to install packages that I got listed with "pacman -Qo"?

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

#5 2025-01-09 00:24:02

maboleth
Member
Registered: 2020-01-03
Posts: 230

Re: [solved] How to install packages that I got listed with "pacman -Qo"?

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

#6 2025-01-09 00:25:26

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: [solved] How to install packages that I got listed with "pacman -Qo"?

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

#7 2025-01-09 00:27:09

mackin_cheese
Member
Registered: 2025-01-07
Posts: 477

Re: [solved] How to install packages that I got listed with "pacman -Qo"?

what are you trying to do? this sounds like a X/Y issue, what is your original goal

Offline

#8 2025-01-09 00:37:13

maboleth
Member
Registered: 2020-01-03
Posts: 230

Re: [solved] How to install packages that I got listed with "pacman -Qo"?

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

Board footer

Powered by FluxBB