You are not logged in.

#1 2009-08-19 08:30:51

ux&lx
Member
Registered: 2008-11-23
Posts: 101

Pacman and parsing question

I'm running a 32-bit Arch and i want to get the list of all installed packages (without the ones from AUR) in a file and them parse this file to cut all the version numbers so I can later on pass this file as a list of packages to install. Is this possible and if so how would I do it?

EDIT:

I've solved the parsing part. With pacman -Q > installed.log I get the list of ALL the installed packages and with

cat installed.log | cut -f1 -d\

cut all thze version numbers out. But how can I get the list of installed packages without the ones from AUR?

Last edited by ux&lx (2009-08-19 08:50:26)

Offline

#2 2009-08-19 09:03:41

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

Re: Pacman and parsing question

"pacman -Qm" will list the installed packages which aren't present on a repo. Usually those are the ones from AUR. With pacman alone, it's not possible to determine for sure whether they came from AUR or you made & installed them by hand.

Offline

#3 2009-08-19 09:10:57

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Pacman and parsing question

from http://wiki.archlinux.org/index.php/Red … d_packages
pacman -Qqe | grep -vx "$(pacman -Qqm)"

you can replace Qqe by Qq if you also want all the dependencies, besides the explicitly installed packages.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#4 2009-08-20 08:58:17

ux&lx
Member
Registered: 2008-11-23
Posts: 101

Re: Pacman and parsing question

Thank you guys. That was very helpful.

Offline

#5 2009-08-20 09:03:57

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Pacman and parsing question

Don't forget that all of the above is in the pacman man page - definitely worth reading.

Offline

Board footer

Powered by FluxBB