It is very straight forward to upgrade Ubuntu between releases.
In this example the server is running 9.10. The next and at the time current long term support release is 10.04.
If we were behind releases, for example at 9.04, we would first upgrade to 9.10 and then 10.04 by repeating the upgrade instructions.
Skipping versions is not advised as it may cause damage to your system.
Determine Version
Before you start you should determine the kernel and release you are currently running. It is helpful to write this information down before starting your release upgrade. Here are the commands with sample data,
uname -a # determine kernal version Linux myra 2.6.32.9-rscloud #6 SMP Thu Mar 11 14:32:05 UTC 2010 x86_64 GNU/Linux lsb_release \-a # determine release number No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 9.10 Release: 9.10 Codename: karmic
The most important point here is that the release is at 9.10 and the next release at the time of this tutorial is 10.04.
An comprehensive and updated table of Ubuntu releases is on the Wikipedia.
Prepare for the Upgrade
First backup your system and data. If you are happen to be using visualization take a snapshot. Whatever your backup method is, make sure the restore works.
Next, upgrade to the most recent packages,
sudo apt-get update sudo apt-get upgrade
Finally stop as many services as possible. Examples include web server deaemons (Apache, nginx, etc), database servers (PostgreSQL, MySQL, etc), and any other non-critical services.
Perform the Upgrade
Perform the release upgrade,
Again, if your system is running real applications and stable make sure you can backup and restore your system before going further.
do-release-upgrade
Verify the Upgrade
Verify that the version you are running has changed,tinpham@myra:/opt$ uname -a
uname -a Linux myra 2.6.32.9-rscloud #6 SMP Thu Mar 11 14:32:05 UTC 2010 x86_64 GNU/Linux lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 10.04.2 LTS Release: 10.04 Codename: lucid