You are not logged in.

#1 2011-05-04 11:44:10

cipater
Member
From: Athens
Registered: 2010-06-09
Posts: 20

pacman -Qe and excluding groups

Hi all.
Just a straightforward question.
Is there a way to exclude a whole group from appearing in the list given by "pacman -Qe"?
For example, I'd like to get the results without anything that belongs to base and base-devel.

Offline

#2 2011-05-04 13:30:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pacman -Qe and excluding groups

You can give

comm -23 <(pacman -Qqe) <((pacman -Qqg base base-devel) | sort)

a shot.

Offline

#3 2011-05-04 13:34:22

cipater
Member
From: Athens
Registered: 2010-06-09
Posts: 20

Re: pacman -Qe and excluding groups

Brilliant!
Thanks.

Offline

#4 2011-05-04 13:34:42

Wey
Member
Registered: 2011-04-22
Posts: 217

Re: pacman -Qe and excluding groups

Hello cipater,
i don't know if there is a straight-forward solution, but this is a simple idea i came up with:
There is a script that shows all files, that are not owned by any package, by comparing the output of find and pacman -Ql, which can be found here.

You can modify this script, e. g. replacing the lines

find /bin /boot /etc /lib /opt /sbin /usr /var | sort -u > full
pacman -Ql | tee owned_full | cut -d' ' -f2- | sed 's/\/$//' | sort -u > owned

with

pacman -Qe | cut -d' ' -f1 |  sort -u > full
pacman -Qg base base-devel | tee owned_full | cut -d' ' -f2 | sort -u > owned

The corresponding headlines in the output will not match, but here, with the given modification, the script will list the desired packages.

/edit: karol came up with a simpler solution

Last edited by Wey (2011-05-04 14:02:02)

Offline

#5 2011-05-04 13:39:33

cipater
Member
From: Athens
Registered: 2010-06-09
Posts: 20

Re: pacman -Qe and excluding groups

A useful script nonethless.
Thanks for your time.

Offline

#6 2011-05-04 13:40:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pacman -Qe and excluding groups

BTW, some packages belong to more than one group, e.g. xorg-apps and xorg. If you exclude either of these groups, the package won't be shown in the listing.

Last edited by karol (2011-05-04 13:42:21)

Offline

#7 2011-05-04 13:46:35

cipater
Member
From: Athens
Registered: 2010-06-09
Posts: 20

Re: pacman -Qe and excluding groups

That applies to both yours and karol's solution right?
I'll keep it in mind anyways.

Offline

Board footer

Powered by FluxBB