Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed 12.04 in a separate partition. Right now, I would like to install the software that I have installed on my 10.04 in my 12.04 too. I was hoping there would be a workaround for this using aptonCD. But I figured out 'restoring' using apt on cd only copies the .debs into the cache file and that might mess things up for me considerably.

The rough idea that I have is :

  1. Run an 'apt' command on 10.04 that will give me all the package names that I have currently installed on my 10.04.
  2. Bring those names to 12.04 and tell apt to fetch the same softwares, but the versions of them that belong to 12.04.
  3. Install them.

Is there anyway to do the above steps or is there a totally different way in which I can achieve this?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

this is one common way to duplicate a package set. On the old machine:

sudo dpkg --get-selections "*" > packages

Copy the file packages to the new machine (a pen drive is a good option. Then run this:

sudo apt-get update
sudo dpkg --set-selections < packages
sudo apt-get -u dselect-upgrade

This doesn't get you only the packages you installed. It also gets their dependencies, etc.

SOURCE

share|improve this answer
    
Thanks for the good idea. If you happen to know, I was wondering about something similar... for testing or reinstalling, I'd like to edit the packages file to pull out the programs I'm always installing, but leave out the ones that either are not needed or automatically installed. I'm especially interested in what would happen if I left out dependencies - would they automatically be added like when you use synaptic or software center? I'd like to develop a base list that can be edited and maintained by me as I go. –  Marty Fried May 1 '12 at 18:08
    
maybe something like this : dpkg --get-selections | grep package1 && dpkg --get-selections | grep package2 && dpkg --get-selections | grep package3 > packages or make an script to pass dpkg --get-selections a .txt file with your program... –  hhlp May 1 '12 at 19:49
    
Thanks, but what if my program/package has dependencies that are not obvious, and have a different name? Perhaps I should read up on dpkg using the link you provided - there may be a command to get the dependencies for a given package or something, if this is required. I was hoping it would automatically add them, or offer to add them, like synaptic. –  Marty Fried May 1 '12 at 19:58
    
Good part of a backup. If you ever had to re-install, say to a replacement system (theft, fire, flood, etc.) you'd be able to copy over all your user data to the new machine and auto-magically install all the software you used to create it with. –  Marc Jun 5 '13 at 1:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.