Monday, May 20, 2013

HOWTO debian / ubuntu re-install packages in bulk.

To put the same packages on the new computer as the old, you can follow the mostly helpful instructions on the immutable Debian Wiki entry on Listing Debian packages. A mild defect of these instructions is they omit the step of installing dselect and updating it's package database. So to be complete:


   # on old system:
   dpkg --get-selections >old_system_selections.txt

   # on new system
   sudo apt-get install dselect
   sudo dselect update
   sudo dpkg --get-selections < old_system_seletions.txt
   sudo apt-get dselect-upgrade

It is possible that some packages won't exist on the new system. For example, if you are changing distributions, squeeze-->wheezy or architechtures i386-->amd64. In that case you can expect some errors like:


    dpkg: warning: package not in database at line 303: libgudev-1.0-0:i386

No comments:

Post a Comment