Posts RSS Comments RSS Computer Network, System and Security stuff
This wordpress theme is downloaded from wordpress themes website.

How to dupplicate your packages selection

You may want to save your selection of packages, in order to reinstall all your softs later without having to look for and manually install them one after another.

On Debian / Ubuntu, this is quite easy.

A while ago the solution used to be :

$ dpkg --get-selections > file.txt

and then, an a freshed installed machine :

$ dpkg --set-selections < file.txt
$ apt-get upgrade

But, for some reason I don’t know and that I would be happy to learn, it seems that this does not work anymore.

Below is the way I got it to work, though it is a little bit more complicated.

So, let’s save the selection of packages into a clean list file, though we are only interested in the packages names :

$ COLUMNS=200 dpkg -l | awk '/^[hi]i/{print $2}' | xargs > liste-apt.txt

and to install on the new machine :

$ cat liste-apt.txt | xargs apt-get install

So far, it worked very well on my servers ! APT is a great tool.

Related posts:

  1. Blocking the version of a package
  2. openSUSE 11.1 and /boot on RAID 1
  3. Sound issue on Debian testing
  4. Compiz Fusion : Debian / Ubuntu repositories
  5. Launchpad.net bug report #154274 : Website does not reference Debian visibly

2 Responses to “How to dupplicate your packages selection”

  1. on 01 Aug 2007 at 11:10 amAzrael Nightwalker

    You can do it much easier with wajig.
    wajig listinstalled > installed.txt
    move the installed.txt file to the new machine and:
    wajig fileinstall installed.txt

  2. on 01 Aug 2007 at 1:57 pmjc

    I haven’t tried yet this soft, but it seems to be a convenient wrapper, though I prefer to stick with the original program (apt or dpkg). Thanks.

Trackback this post | Feed on Comments to this post

Leave a Reply

Still buying movies offline?