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'm migrating from 12.04 to 14.04. I have already backed up my installed software sources in 12.04 using

sudo cp -R /etc/apt/sources.list* ~/

command from this question - Best way to backup all settings, list of installed packages, tweaks, etc?.

If I replace the software sources and install the packages using sudo apt-get install dselect will I get the packages installed with the latest version that is meant for the new distribution ?

For example ,

php 5.3 => default version in 12.04
php 5.4 => default version in 14.04 (I need this version to be installed)

If I restore the sources.list to my new 14.04 installation using

sudo cp -R ~/sources.list* /etc/apt/

and do a sudo apt-get update, which version of php(or any other software) do I get ? The latest ones meant for 14.04 or the ones installed in my 12.04 ? Will all the instances of precise in my software sources be replaced with the new distribution code name or should it be done manually ?

I have stopped my migration process confused on how this might behave. Basically, I want all the latest version of the installed softwares from the repository that is meant for 14.04.

[PS: I just want the latest version from the repository, not the latest stable versions of any of the packages that might require manual installation of binaries]

share|improve this question
You'll get a mess. Do not overwrite the core repository list to that of a different release. Any reasonable addition to source lists should be in /etc/apt/sources.list.d/. If you have external entries in the sources.list file, move them to individual files in that sources.list.d. Are you upgrading or moving to a separate instance of Ubuntu? The PS isn't very clear to me. –  muru Jul 13 '14 at 8:31
@muru I have installed 14.04 alongside 12.04. Now I have a fresh install of 14.04 with no softwares installed. I thought of importing my sources.list from 12.04 and install the softwares. Now, should I manually look at my 12.04 sources.list and install them in 14.04 ? –  palerdot Jul 13 '14 at 16:48
Just glance over your sources.list from 12.04 and see if there are any URLs not part of the mirror you used. If not, you can use the software-properties-gtk app to get a quick status of enabled repositories, which you can use to decide which files in sources.list.d to copy. For the main ones in sources.list can be enabled or disabled via checkboxes in the GUI, a much safer method - which also lets you choose a known mirrror easily. –  muru Jul 13 '14 at 17:46

Your Answer


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

Browse other questions tagged or ask your own question.