Tip: Generate A List of Installed Packages For Easy Reinstall

I know for most of you out there this will be a bit late. But for those that haven’t yet made the move over to Lucid Lynx, here is a helpful way to make it that much easier. You can create a list of current installed packages on your Karmic install and then later use the same list to reinstall all the listed packages in one swift command.  Be sure to look it over before you actually use it to reinstall, there may be many things in there you actually don’t want any more.

$ sudo dpkg --get-selections > /location/of/my-packages
$ sudo nano /location/of/my-packages
  1. Generate/Create your installed package list
  2. Open it up and delete anything you dont need.
  3. Now save this file some place safe like a thumb drive to easily transfer it to your new install when ready.

After new install is online…

$ sudo aptitude install dselect
$ sudo dpkg --set-selections < /location/of/my-packages
$ sudo dselect
  1. Once you have the new system installed install dselect
  2. Run this to install everything in the “my-packages” file
  3. Run deselect

Tags:

 

About the author

More posts by | Visit the site of Scott

 

4 Comments

  1. Anjum says:

    Thanks for the reply Scott ! Ubuntu DVD seems to provide nothing more than additional language packs. Otherwise its the same vanilla disc as Ubuntu CD.

    I used to adopt the following strategy to get the required packages offline:

    sudo apt-get update
    sudo apt-get install package-list -y –print-uris > packages.uri
    – egrep to get links from packages.uri and stored in packages.txt
    wget `cat packages.txt`
    – copy all packages to /var/cache/apt/archives
    – run dpkg

    now this used to work for Jaunty and Karmic, but no more with Lucid..and this has been getting me increasingly frustrated..

    what are your thoughts ?

  2. Scott says:

    In a nutshell it’s just a matter of keeping a copy of your installed packages. But the thing that will make that annoying and possibly difficult are the dependencies for the packages that will need to be installed as well.

    I think there are some decent guides that can be easily found on this topic, But I haven’t written any myself.

    The easiest and quickest thing I can think of is to download the live DVD installation disc instead of the regular live CD installation disc. But obviously that’s not a complete solution either depending on what you want to archive.

  3. Anjum says:

    question…in addition to above if i also want to make this an offline installation; what all additional steps may be required.

  4. [...] This post was mentioned on Twitter by Sucka.net. Sucka.net said: :: Tip: Generate A List of Installed Packages For Easy Reinstall http://bit.ly/dsbO3n [...]

Leave a Comment

 




 

 
Extra Tags