You are not logged in.

#1 2009-06-14 17:02:30

Andy Mack
Member
Registered: 2008-06-16
Posts: 133

Download Installed Packages for Re-installation

I have managed to get what I consider my perfect Arch. What I would like to do is download all the packages I have installed, save them to either external hd or disc. How would I go about doing this?

Also if and when I do a reinstallation how would I install those packages without having to do it one by one.

Thanks

Offline

#2 2009-06-14 17:05:52

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

Re: Download Installed Packages for Re-installation

I've got a script I wrote that's in AUR called packup that takes a snapshot of all the packages that are currently installed allows restoration of said snapshots... Might well work for what you're trying to do.


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

Offline

#3 2009-06-14 20:39:38

iggy
Member
From: Germany, L.E. - Leipzig
Registered: 2004-10-17
Posts: 367

Re: Download Installed Packages for Re-installation


sorry for my bad english smile

Offline

#4 2009-07-10 13:53:04

Andy Mack
Member
Registered: 2008-06-16
Posts: 133

Re: Download Installed Packages for Re-installation

How do I go about installing the packages I copied across? Do I have to do it one by one?

Offline

#5 2009-07-10 14:18:47

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,799
Website

Re: Download Installed Packages for Re-installation

copy, tar, or burn /var/cache/pacman/pkg/*
(edit: the above makes reinstall faster, but it's not required...)

# get a list of explicitly installed packages minus any foreign (AUR) packages
# they'll pull in their own deps on reinstall...
pacman -Qqe | grep -v "$(pacman -Qqm)" > pacman.lst

# reinstall them like this:
cat pacman.lst | xargs pacman -S --needed --noconfirm

pacman rules.

Last edited by brisbin33 (2009-07-10 14:34:25)

Offline

#6 2009-07-10 15:35:42

Andy Mack
Member
Registered: 2008-06-16
Posts: 133

Re: Download Installed Packages for Re-installation

I have my packages in var/cache/pacman/pkg
I ran pacman -Qqe | grep -v "$(pacman -Qqm)" > pacman.lst, it generated the list then ran cat pacman.lst | xargs pacman -S --needed --noconfirm but I get, error: no targets specified.

Wont install anything

Offline

#7 2009-07-10 15:49:53

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,799
Website

Re: Download Installed Packages for Re-installation

that's because of --needed.

generate the list, uninstall some shit, then cat the list to xargs

you'll see what you just uninstalled as the targets.

i.e. man pacman big_smile

/edit:

┌─[ 11:53 ][ blue:~ ]
└─> pacman -Qqe | grep -v "$(pacman -Qqm)" > temp.paclist
┌─[ 11:53 ][ blue:~ ]
└─> cat temp.paclist | xargs sudo pacman -S --needed
warning: abcde-2.3.99.7-1 is up to date -- skipping

--//snip//--

warning: downgrading package libtorrent (0.12.4-1 => 0.12.2-2)

--//snip//--

warning: downgrading package rtorrent (0.8.4-1 => 0.8.2-3)

--//snip//--

warning: zlib-1.2.3.3-3 is up to date -- skipping
resolving dependencies...
looking for inter-conflicts...

Targets (2): libtorrent-0.12.2-2  rtorrent-0.8.2-3

Total Download Size:    0.70 MB
Total Installed Size:   2.01 MB

Proceed with installation? [Y/n]

Last edited by brisbin33 (2009-07-10 15:55:49)

Offline

#8 2009-07-11 11:49:06

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

Re: Download Installed Packages for Re-installation

Andy Mack wrote:

I have managed to get what I consider my perfect Arch. What I would like to do is download all the packages I have installed, save them to either external hd or disc. How would I go about doing this?

Also if and when I do a reinstallation how would I install those packages without having to do it one by one.

Thanks

pacman -Sw $(pacman -Qq)

Then either put them in /var/cache/pacman/pkg on the new install and -Sy as usual, or create a local repository and install from that.

Edit: Trow in a pipe or 3 to filter out pacages from aur if you want.

Last edited by Mr.Elendig (2009-07-11 11:53:46)


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

Offline

#9 2009-07-11 15:16:48

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: Download Installed Packages for Re-installation

Ghost1227: Packup seems good for me smile Thank you.

Offline

Board footer

Powered by FluxBB