You are not logged in.

#1 2009-03-20 20:58:21

Odysseus
Member
Registered: 2009-02-15
Posts: 141

Find all packages explicitly installed, excluding base packages?

The -Qe option for pacman is fairly handy, but it includes all the packages installed when I first installed Arch. 
Is there a way to just see all the packages I have explicitly installed myself, not by the installer?

Last edited by Odysseus (2009-03-20 20:58:36)


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#2 2009-03-20 21:24:09

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Find all packages explicitly installed, excluding base packages?

Search the forum for this, or look at the "Handy Utilities you made" thread, iirc there are a few scripts floating around that do this.  Also check Xyne's page for his Arch utilities.

Offline

#3 2009-03-20 21:36:29

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Find all packages explicitly installed, excluding base packages?

Something like this?

pacman -Qi | awk '/^Name/ {name=$3} /^Groups/ { if ( $3 != "base" ) { print name } }'

EDIT

Good idea Ranguvar, and also use -Qei

pacman -Qei | awk '/^Name/ {name=$3} /^Groups/ { if ( $3 != "base" && $3 != "base-devel") { print name } }'

Last edited by Procyon (2009-03-20 21:52:09)

Offline

#4 2009-03-20 21:42:01

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: Find all packages explicitly installed, excluding base packages?

You may also want to filter out base-devel.

Offline

#5 2009-03-20 22:28:45

Odysseus
Member
Registered: 2009-02-15
Posts: 141

Re: Find all packages explicitly installed, excluding base packages?

Thanks guys!  Yea, I do have base-devel installed too, so even better!

Oh, and how would I go about aliasing that?  I'm getting a syntax error from awk if I try this:

alias pacman-explicit="pacman -Qei | awk '/^Name/ {name=$3} /^Groups/ { if ( $3 != "base" && $3 != "base-devel" ) { print name } }'"

Last edited by Odysseus (2009-03-20 22:44:26)


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#6 2009-04-25 17:41:12

Xiong Chiamiov
Member
From: central coast, california
Registered: 2008-06-18
Posts: 142
Website

Re: Find all packages explicitly installed, excluding base packages?

Odysseus wrote:

Thanks guys!  Yea, I do have base-devel installed too, so even better!

Oh, and how would I go about aliasing that?  I'm getting a syntax error from awk if I try this:

alias pacman-explicit="pacman -Qei | awk '/^Name/ {name=$3} /^Groups/ { if ( $3 != "base" && $3 != "base-devel" ) { print name } }'"

You need to encase it in a function:

function pacman-explicit () pacman -Qei | awk '/^Name/ {name=$3} /^Groups/ { if ( $3 != "base" && $3 != "base-devel") { print name } }'

Offline

Board footer

Powered by FluxBB