Transfering installed packages on one sys to another
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Distribution: Debian Etch 2.6.18-(custom compile for k7) with a 72 no 58 no 42 second bootup time (XP=4mins)
Posts: 52
Rep:
Transfering installed packages on one sys to another
I had a really sweet version of etch running a week ago when i upgraded my hard drive, i've got both the old and new in now but i'm running etch off the new. The thought of figuring out which packages to download again kills me so i'm wondering if somewhere i can grab a list of the installed packages on the old system and do something with it, thoughts?
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
in theory you should be able to mount your old system somewhere and simply point apt, dpkg or aptitude to the packages database on that hdd to retreive information :-)
Other than using chroot, how might one "point apt, dpkg or aptitude to the packages database on that hdd"?
In addition to the good advice above, before you destroy the old system, also consider:
Quote:
from man dpkg
dpkg --get-selections [package-name-pattern...]
Get list of package selections, and write it to stdout.
dpkg --set-selections
Set package selections using file read from stdin.
This file should be in the format '<package> <state>',
where state is one of install, hold, deinstall or purge.
Blank lines and comment lines beginning with '#' are also permitted.
...
To make a local copy of the package selection states:
dpkg --get-selections >myselections
You might transfer this file to another computer, and install it there with:
dpkg --set-selections <myselections
Note that this will not actually install or remove anything, but just set the selection state on the requested packages. You will need some other application to actually download and install the requested packages. For example, run dselect and choose "Install".
Ordinarily, you will find that dselect(8) provides a more convenient way to modify the package selection states.
I just tried this on a re-install, unfortunately, dpkg --set-selections <myselections re-installed everything including what I had already done w/ the original CD. Would have taken hours if I hadn't aborted it.
Although I haven't tried it yet, I believe apt-get dselect-upgrade might work better:
Quote:
from man apt-get
dselect-upgrade
dselect-upgrade is used in conjunction with the traditional Debian packaging front-end, dselect(8). dselect-upgrade follows the changes made by dselect(8) to the Status field of available packages, and performs the actions necessary to realize that state (for instance, the removal of old and the installation of new packages).
Last edited by archtoad6; 11-12-2006 at 06:47 PM.
Reason: "speling"
Distribution: Debian Etch 2.6.18-(custom compile for k7) with a 72 no 58 no 42 second bootup time (XP=4mins)
Posts: 52
Original Poster
Rep:
Quote:
Originally Posted by archtoad6
dselect-upgrade follows the changes made by dselect(8) to the Status field of available packages, and performs the actions necessary to realize that state (for instance, the removal of old and the installation of new packages).
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
Quote:
Originally Posted by Nathanael
in theory you should be able to mount your old system somewhere and simply point apt, dpkg or aptitude to the packages database on that hdd to retreive information :-)
Apologies, i confused this with another packaging system where this is possible!
but chroot is at least something :-)
Distribution: Debian Etch 2.6.18-(custom compile for k7) with a 72 no 58 no 42 second bootup time (XP=4mins)
Posts: 52
Original Poster
Rep:
I wish that were possible, but as part of tweaking my system i cleared the cached debs, i guess i have no choice but to d/l. Thanks all for your help, you guys (/gals) on this forum rock.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.