You are not logged in.

#1 2008-10-09 01:14:18

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Generating a List of Installed Packages

Is there a way to generate a text file that contains all of the packages that are installed on my system? I'd like this so i can install all of the packages I have installed if I screw something up again.

Offline

#2 2008-10-09 01:46:23

rcoyner
Member
From: Washington D.C.
Registered: 2008-05-16
Posts: 30
Website

Re: Generating a List of Installed Packages

pacman -Q > pacman.txt

Offline

#3 2008-10-13 06:33:56

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Generating a List of Installed Packages

thanks

Offline

#4 2008-10-13 08:01:51

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Generating a List of Installed Packages

most probably you want
pacman -Qe
actually...

Offline

#5 2008-12-28 00:57:41

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Generating a List of Installed Packages

how can i feed this list of installed packages to pacman or is this not possible? if this isnt possible its a lot less useful for my needs :-/

Offline

#6 2008-12-28 01:10:11

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: Generating a List of Installed Packages

pacman -Qe | awk '{print $1}' > package_list.txt

...and...

 for x in $(cat package_list.txt); do pacman -S $x; done

...or...

pacman -S `cat package_list.txt`
#This will also work, but Pacman will exit if you have a package
#installed that is not in the repositories.

Last edited by Wintervenom (2008-12-28 01:13:28)

Offline

#7 2008-12-28 01:30:03

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Generating a List of Installed Packages

I think this pertains more to the Newbie Corner. Moving.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#8 2008-12-28 01:50:41

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,470
Website

Re: Generating a List of Installed Packages

Wintervenom wrote:
pacman -Qe | awk '{print $1}' > package_list.txt

Or:

pacman -Qqe > package_list.txt

Offline

#9 2008-12-28 02:27:35

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: Generating a List of Installed Packages

yikes Well, I'll be... tongue

Last edited by Wintervenom (2008-12-28 02:28:07)

Offline

#10 2008-12-29 19:11:23

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: Generating a List of Installed Packages

I doubt you need it anymore, but I've been working on a project which has made it to beta and is up for grabs. If anyone is looking for something along these lines, Packup is a backup & recovery script for Pacman.

When I get around to it (i.e., after work) I'll make a post detailing it in the community projects section. If you're impatient, check out our website here.

Last edited by Ghost1227 (2008-12-29 19:11:37)


.:[My Blog] || [My GitHub]:.

Offline

#11 2009-01-12 23:33:28

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Generating a List of Installed Packages

thats an awesome little program you have there, great job!

Offline

#12 2009-01-13 02:07:15

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: Generating a List of Installed Packages

lol thanks! Packup actually has it's own thread here if you need it... (of course you could just use the tools provided at my website [bugtracker, forums, etc])


.:[My Blog] || [My GitHub]:.

Offline

#13 2009-01-13 03:20:53

quickfished
Member
From: Hong Kong
Registered: 2009-01-06
Posts: 29

Re: Generating a List of Installed Packages

This is what I did.

Generating the package list: pacman -Qqe > package.list
Installing from the package list: pacman -S $(cat package.list)
Is this what Pacup does?

The only problem I had is that it also lists the packages installed from the AUR with yaourt.

Offline

#14 2009-01-13 04:03:34

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: Generating a List of Installed Packages

packup's a bit more complex than that... it can backup/restore official packages (core and extra), unofficial packages (community, aur, and other), or all packages, as well as backup and recovery of config files for pacman/yaourt and it's got a few other surprises coming...


.:[My Blog] || [My GitHub]:.

Offline

#15 2009-01-13 05:00:09

quickfished
Member
From: Hong Kong
Registered: 2009-01-06
Posts: 29

Re: Generating a List of Installed Packages

Ghost1227 wrote:

packup's a bit more complex than that... it can backup/restore official packages (core and extra), unofficial packages (community, aur, and other), or all packages, as well as backup and recovery of config files for pacman/yaourt and it's got a few other surprises coming...

Sounds very good.  I will most certainly look into Packup then.

Offline

#16 2009-01-13 05:35:30

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: Generating a List of Installed Packages

quickfished wrote:
Ghost1227 wrote:

packup's a bit more complex than that... it can backup/restore official packages (core and extra), unofficial packages (community, aur, and other), or all packages, as well as backup and recovery of config files for pacman/yaourt and it's got a few other surprises coming...

Sounds very good.  I will most certainly look into Packup then.

Enjoy!


.:[My Blog] || [My GitHub]:.

Offline

#17 2010-12-03 00:49:55

ndowens
Member
Registered: 2007-08-15
Posts: 39
Website

Re: Generating a List of Installed Packages

Ghost1227 wrote:
quickfished wrote:
Ghost1227 wrote:

packup's a bit more complex than that... it can backup/restore official packages (core and extra), unofficial packages (community, aur, and other), or all packages, as well as backup and recovery of config files for pacman/yaourt and it's got a few other surprises coming...

Sounds very good.  I will most certainly look into Packup then.

Enjoy!


Of course Ghost has to show off his talent tongue Right Ghost?


My site: ndowens.tk

Offline

#18 2010-12-03 01:38:36

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: Generating a List of Installed Packages

ndowens wrote:

Of course Ghost has to show off his talent tongue Right Ghost?

Of course ndowens has to show off his necroposting talent tongue Right ndowens?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#19 2011-11-16 04:56:39

DasFox
Member
Registered: 2010-11-24
Posts: 107

Re: Generating a List of Installed Packages

Isn't now for Arch pacman -Q > package_list.txt correct?

pacman -Qqe or pacman -Qe doesn't show everything...


THANKS


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

#20 2011-11-16 13:04:11

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Generating a List of Installed Packages

I saw this neat little code posted somewhere for generating a list with dates.  You can direct it to a text file if you wish.

pacman -Qi | sed '/^Name/{ s/  *//; s/^.* //; H;N;d}; /^URL/,/^Build Date/d; /^Install Reason/,/^Description/d; /^  */d;x; s/^.*: ... //; s/Jan/01/;  s/Feb/02/;  s/Mar/03/;  s/Apr/04/;  s/May/05/;  s/Jun/06/;  s/Jul/07/;  s/Aug/08/; s/Sep/09/; s/Oct/10/;  s/Nov/11/;  s/Dec/12/; / [1-9]\{1\} /{ s/[[:digit:]]\{1\}/0&/3 }; s/\(^[[:digit:]][[:digit:]]\) \([[:digit:]][[:digit:]]\) \(.*\) \(....\)/\4-\1-\2 \3/' | sed ' /^[[:alnum:]].*$/ N; s/\n/ /; s/\(^[[:graph:]]*\) \(.*$\)/\2 \1/; /^$/d'

Offline

#21 2011-11-16 15:04:37

Reki
Member
Registered: 2011-10-27
Posts: 59

Re: Generating a List of Installed Packages

I use

pacman -Qq > packages.txt

I find that using pacman -Qqe only list locally installed packages, and -Qq shows even those I download from the AUR. It's all personal preferences though.

Offline

#22 2011-11-16 15:15:59

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

Re: Generating a List of Installed Packages

Offline

#23 2011-11-16 15:17:06

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Generating a List of Installed Packages

Thank you. Op can mark this as solved. Closing as necro-bump: https://wiki.archlinux.org/index.php/Fo … Bumping.27


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB