Before upgrading your system, it is strongly recommended that you make a full backup, or at least back up any data or configuration information you can’t afford to lose. The upgrade tools and process are quite reliable, but a hardware failure in the middle of an upgrade could result in a severely damaged system
The main things you’ll want to back up are the contents of /etc, /var/lib/dpkg and the output of
dpkg --get-selections “*” (the quotes are important).
The upgrade process itself does not modify anything in the /home directory. However, some applications (e.g. parts of the Mozilla suite, and the GNOME and KDE desktop environments) are known to overwrite existing user settings with new defaults when a new version of the application is first started by a user. As a precaution, you may want to make a backup of the hidden files and directories (“dotfiles”) in users’ home directories. This backup may help to restore or recreate the old settings. You may also want to inform users about this.
Any package installation operation must be run with superuser privileges, so either login as root or use su or sudo to gain the necessary access rights.
Unofficial sources and backports
If you have any non-Debian packages on your system, you should be aware that these may be removed during the upgrade because of conflicting dependencies. If these packages were installed by adding an extra package archive in your /etc/apt/sources.list, you should check if that archive also offers packages compiled for etch and change the source line accordingly at the same time as your source lines for Debian packages.
Adding APT sources
The default configuration is set up for installation from main Debian Internet servers, but you may wish to modify /etc/apt/sources.list to use other mirrors, preferably a mirror that is network-wise closest to you.
For example, suppose your closest Debian mirror is http://mirrors.kernel.org/debian/. When inspecting that mirror with a web browser or FTP program, you will notice that the main directories are organized like this:
To use this mirror with apt, you add this line to your sources.list file
deb http://mirrors.kernel.org/debian etch main contrib
Note that the `dists’ is added implicitly, and the arguments after the release name are used to expand the path into multiple directories.
After adding your new sources, disable the previously existing “deb” lines in sources.list by placing a hash sign (#) in front of them.
The recommended way to upgrade from previous Debian GNU/Linux releases is to use the package management tool aptitude. This program makes safer decisions about package installations than running apt-get directly.
Next you should double-check that the APT source entries (in /etc/apt/sources.list) refer either to “etch” or to “stable”. There should not be any sources entries pointing to sarge. Note: source lines for a CD-ROM will often refer to “unstable”; although this may be confusing, you should not change it.
Once you’ve updated your sources.list in /etc/apt you can upgrade from Sarge to Etch by running:
# apt-get update
# apt-get install aptitude
aptitude -f --with-recommends dist-upgrade