You are not logged in.

#1 2010-01-09 21:00:44

abrouwers
Member
Registered: 2006-05-15
Posts: 6

pacman -Qe - ignore groups?

I was wondering, outside of creating some lists + using diff, if it is possible to view packages that I have explicitely installed, but to ignore certain groups?  For example, when I run "pacman -Qe" , it shows stuff that I've installed myself, but I really don't think the list including packages from the base or base-devel group are useful. 

Is it possible to show packages I've explicitly installed, ignoring items from certain groups? 

Thanks!

Offline

#2 2010-01-09 21:21:56

ZaQ
Member
Registered: 2009-12-12
Posts: 106

Re: pacman -Qe - ignore groups?

I'm  not sure, what you're looking for. But maybe you mean -Qet (explicitely installed, no other pakage depends on it) or -Qg or... (read the man wink (http://www.archlinux.org/pacman/pacman.8.html))

Last edited by ZaQ (2010-01-09 21:22:41)

Offline

#3 2010-01-10 17:56:44

abrouwers
Member
Registered: 2006-05-15
Posts: 6

Re: pacman -Qe - ignore groups?

I've definitely read the man page trying to find such an option.  Basically, I'd like to do a "pacman -Qe | grep -v "stuff in base and base-devel groups" .  So, stuff that *I* have installed myself, and not during the installation of arch, etc.  It does not seem like there is a way to do this directly.

Thanks anyway!

Offline

#4 2010-01-12 23:47:33

harryNID
Member
From: P3X-1971
Registered: 2009-06-12
Posts: 117

Re: pacman -Qe - ignore groups?

Well I don't think there's a way directly but you could try this: (this imitates what you asked for "pacman -Qe | grep -v "stuff in base and base-devel groups")

clear && pacman -Qg | grep -E '^base' | sed 's/.* //; s=.*=\/&\/\d=' > temp.sed && clear && pacman -Qe | sed 's/ .*//'|  sed -f temp.sed && rm temp.sed

What this does is call "pacman -Qg" and creates a list of all packages in base/base-devel. It then creates a sed script (temporarily in the ./) from the output. It then does "pacman -Qe" and uses the sed script to modify the output and get rid of the base/base-devel entries.  Finally it gets rid of the temp sed script.

Just whipped this up when I read your post so I haven't tested it very well. It also doesn't show "pkgver" as I had to strip them out to match the output of "pacman -Qg"

Hope this is close to what you wanted.

Almost forgot, you might want to kill xorg groups too if so use this:

clear && pacman -Qg | grep -E '^base|^xorg' | sed 's/.* //; s=.*=\/&\/\d=' > temp.sed && clear && pacman -Qe | sed 's/ .*//'|  sed -f temp.sed && rm temp.sed

In solving a problem of this sort, the grand thing is to be able to reason backward. That is a very useful accomplishment, and a very easy one, but people do not practice it much. In the everyday affairs of life it is more useful to reason forward, and so the other comes to be neglected. There are fifty who can reason synthetically for one who can reason analytically.  --Sherlock Holmes

Offline

#5 2010-01-13 01:32:46

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: pacman -Qe - ignore groups?

pacman -Qgq base base-devel # all packages in groups base and base-devel, add more if you want
pacman -Qetq # all packages explicitly installed

pacman -Qetq | fgrep -vxf <(pacman -Qgq base base-devel)

gives all packages in the second group that aren't in the first

alternatively:

comm -23 <(pacman -Qetq) <(pacman -Qgq base base-devel xorg | sort)

Offline

#6 2010-01-13 17:58:25

the_isz
Member
Registered: 2009-04-14
Posts: 280

Re: pacman -Qe - ignore groups?

Profjim wrote:
comm -23 <(pacman -Qetq) <(pacman -Qgq base base-devel xorg | sort)

Brilliant!

I've been wanting this for quite some time now (though it never was important
enough to me to actually spend time researching), but this is exactly what I was
looking for.

Thanks for this!

Offline

Board footer

Powered by FluxBB