Saturday, December 17, 2016

apt - How can I duplicate my existing software packages on a new system?



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?



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


No comments:

Post a Comment

11.10 - Can&#39;t boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...