For example, we have Debian Lenny and we need to upgrade it to Debian Squeeze

1) do upgrade to current distro version:

apt-get update
apt-get dist-upgrade

2) Please record session that you can find later any errors:

script -t 2>~/upgrade-debian.time -a ~/upgrade-debian.script

3) Check current packages:

dpkg --audit

4) change-replace in /etc/apt/sources.list "lenny" -> "squeeze" (don't use "stable")

5) Upgrade packages:

apt-get update
apt-get upgrade

6) Install new kernel:

apt-get install linux-image-{ARCH}

7) Install udev:

apt-get install udev

8) Do upgrade to squeeze:

apt-get update
apt-get dist-upgrade

9) Check insserv for problems:

dpkg-reconfigure insserv sysv-rc

10) install some new packages:

* be careful with network cards:
apt-get install firmware-linux-free firmware-linux-nonfree

#probably you should install some specific network firmware, then search for it, for example "apt-cache search realtek"

* in case you upgraded mailserver:
apt-get install apt-get install gamin

* in case you upgraded server with rdiff-backup in it:
apt-get install rdiff-backup --reinstall

11) cleanup:

apt-get autoremove --purge
apt-get clean
phone +372 5507447 mail me