[How To] Upgrade from Ubuntu 12.04 to 13.04

If you are running Ubuntu 12.04 LTS and have been raring to jump to ‘Raring Ringtail’ edition of Ubuntu, you can follow the commands below to switch to bleeding edge features. Ubuntu 13.04 (Raring Ringtail) is past the beta stage now and is very stable; can easily be used as a daily driver. 

Upgrading is a cakewalk in Ubuntu when you upgrade to the next release. However, if you are jumping one release, you may have to sweat it out a bit. If you follow the standard procedure of using the update manager, you will have to first upgrade to Ubuntu 12.10 and then Ubuntu 13.04. Well nobody has that amount of spare time!
The process below, is for a direct jump from 12.04 to 13.04. I followed the same procedure. It worked for me. I would suggest to remove any third party graphics drivers such as ATI or Nvidia before upgrading. 


Disclaimer: Please follow the instructions at your own risk. I assume you have some knowledge of Linux and can troubleshoot. I am not responsible if your laptop/desktop goes up in flames!

1. Open up gedit with root previledges . Press Alt+F2 and type in the following
gksu gedit /etc/apt/sources.list
2. Now press Ctrl + H and search for precise and replace with raring. Click ‘Replace All’ , save and close the editor.

Or a one liner in the commandline
cd /etc/apt/
sudo sed -i ‘s/precise/raring/g’ sources.list

3. If you have added external ppas, you can change the distribution name from Precise to Raring. Using the GUI method above involves too many steps. The best way is to open a terminal and type in the following commands:
cd /etc/apt/sources.list.d
sudo find . -name “*.list” -print | xargs sed -i ‘s/precise/raring/g’
sudo find . -name “*.save” -print | xargs sed -i ‘s/precise/raring/g’

4. And then, move the folder to avoid being used during the upgrade process
sudo mv /etc/apt/sources.list.d/ /etc/apt/sources.list.d.bk/

5. Start the upgrade process with the dist-upgrade command 
sudo apt-get update && sudo apt-get dist-upgrade
6. You may have to give some user input during the installation process. Press Y or I to install the package maintainer’s version of the packages. 

7. Once the upgrade is complete, to make sure you have all the dependencies of the latest ubuntu desktop, reinstall the ubuntu-desktop package
sudo apt-get install –reinstall ubuntu-desktop

8. Check the grub is updated properly and the boot image is created. Use the following commands:

sudo update-grub
sudo update-initramfs -u
9. Once that completes successfully, reboot the system. Your brand new Ubuntu 13.04 will be ready for use.
10. As for the third party ppas, you can move back the backed up sources.list file and update the repositories.

sudo rm -rf sources.list.d

sudo cp -r sources.list.d.bk/ sources.list.d/
sudo apt-get update
11. Remember some ppas will throw an exception because Raring ppas are  still not available for some. You can disable those ppas from System Settings -> Software & Updates.

Related Post

Leave a Reply

tuxtrixmod