To bring a command line Ubuntu installation up to date with the most current versions of all packages:
sudo aptitude update
sudo aptitude safe-upgrade
sudo aptitude full-upgrade
To upgrade your Ubuntu Server from 7.04 to 7.10 follow these few steps and you’ll be presented with a menu that will walk you through the upgrade process.
sudo aptitude install update-manager-core
sudo do-release-upgrade