You are not logged in.
Is there a way I can have pacman query my set of installed packages and which repo they came from? For example: pacman -Q returns a list of all my installed packages. I'd like to have the same list but also showing me which repo the given package came from (i.e. core, extra, etc.)
Last edited by graysky (2009-03-11 23:31:26)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Seemed to kill my machine when I did it but:
for i in $(pacman -Qq); do pacman -Ss ^$i$; done
There may be a way to do it natively, if so, the man page should say.
Last edited by rson451 (2009-03-11 23:56:23)
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
Not the most efficient, but both seem to work:
LIST=$(pacman -Sl); for ARG in $(pacman -Qq); do echo "$LIST" | grep " $ARG "; done
for ARG in $(pacman -Qq); do echo -n "$ARG : "; echo $(pacman -Si $ARG 2>/dev/null | head -n1 | cut -d ':' -f2); done
*edit*
My 1000th post... have I unlocked anything?
Last edited by Xyne (2009-03-12 00:06:56)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
There is no native way to do this, but you can use "paclist" in pacman-contrib to see what packages you have installed from a given repo. I use it to keep track of the packages I install from [testing].
Offline
My 1000th post... where's my cookie?
The best I can do for you is to ban you for a day so you can celebrate the breaking of you addiction.
Offline
Cool! Thank you very much for the post, rson451, but it's not achieving the effect I was after... let me explain. I have the three official arch repos in my /etc/pacman.conf but I also have some 3rd party repos in there too. I want a way to list all the packages I have installed and where they came from so I can figure out which of them are from the official repo and which are from the 3rd party repo. Some of them have the same name which is why I want to see the package name, and the repo from which it came.
I know about the -Qm switch, and if I comment out the 3rd party repo, then update pacman (-Sy) and use the (-Qm) switch it will show me which packages didn't come from the official arch repo... but that doesn't catch those packages with the same name that may have come from the 3rd party repo!
Anyone?
Last edited by graysky (2009-03-12 00:08:56)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Not the most efficient, but both seem to work:
LIST=$(pacman -Sl); for ARG in $(pacman -Qq); do echo "$LIST" | grep " $ARG "; done
This works I think... I can load the output into a spreadsheet and sort it.
Thank you!
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
The best I can do for you is to ban you for a day so you can celebrate the breaking of you addiction.
I expected a reply along those lines. You also quoted me within the 20 second window of re-editing my post.
*sigh*
I probably should stop keeping the forum on a tab most of the time.
...but that doesn't catch those packages with the same name that may have come from the 3rd party repo!
I think the problem is that once the package is on your system, pacman doesn't know or care where it came from, so I don't think it's possible.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I think the problem is that once the package is on your system, pacman doesn't know or care where it came from, so I don't think it's possible.
I think as long as the repo has a unique name I can use your method to generate the lists.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Since this post came somewhere on the top of my Google search, I'd like to present a simple alternative solution, even though this topic is quite old.
yaourt -Q
does exactly what the OP asked for. The only thing is that you would need to install yaourt.
Offline