Saturday 2 November 2013

Upgrading Ubuntu to newer versions


Now at present when we come to Windows operating system we can't upgrade our older versions to the newest version i.e. Windows 7 to Windows 8. But this problem is not there in Ubuntu, we can simply upgrade our old versions to the new ones. Now let us see how we can do it?
This upgrade process can be done from the Terminal by using the following commands. But before upgrading your system you better back up your system for safety.

         sudo apt-get install update-manager-core
         sudo do-release-upgrade

The above is the most preferred method.
You can also use the update-manager (all editions):

        sudo apt-get install update-manager
        sudo update-manager -d

or you can also use:

        sudo apt-get update
        sudo apt-get upgrade
        sudo apt-get dist-upgrade

Now you know how to Upgrade your system but what about the installations you have done in the previous one. Do you need to get them again? I surprisingly say a NO to the question. We can get the installations in the following way:
We just need to mark the packages and services installed on your old system and save the settings ("markings") into a file. Then install the new version of Ubuntu and allow the system to reinstall packages and services using the settings saved in the "markings" file.
NOTE: This must be done before the upgrading.
On the old system:
Open Synaptic Package Manager then open File and Save Markings
Save the markings file to an external medium, such as a USB drive. Backup your system's other important files (e.g. the /home directory) before the installation of the new system.
Then in the freshly-installed new system:
Open Synaptic Package Manager then File and then Read markings and load the file on your USB drive (or other external storage) previously saved. You have to keep in mind that some of the installations may not be compatible in the newer versions of Ubuntu.

If you want to do this from the Terminal follow this process:

        dpkg --get-selections >~/my-packages

This will create a my-packages file in the ~ (home) directory which will be having a list of the packages installed on the old system. It's better to copy this file to a safe place
Proceed with the clean installation. Enable the same repositories that were enabled in the old system.
Now copy the my-packages file to the ~ (/home) folder. Run:

        sudo dpkg --set-selections <my-packages&&sudo apt-get dselect-upgrade

Now the packages you had installed in your old system will be reinstalled in the new version.

No comments:

Post a Comment