Upgrading to a different Debian branch

Debian comes in three different branches, or stages of development. The stable branch, currently (October 2010) codenamed Lenny, is designed for enterprise use. It is not stable in the sense of fewer bugs, but rather the only updates are bug fixes. This is designed so local or custom-written programs won't break when their dependencies are updated. This comes at the cost of being a bit behind the curve, so it is not recommended for individual use.

The testing branch, currently (also October 2010) codenamed Squeeze, is the best choice for individual use. Packages are only placed in the testing branch after extensive testing in the unstable branch, so the testing branch, at any one time, is about as stable as a x.0 release of any other distro. However, security patches are not released as fast as they are for the stable branch.

The unstable branch, permanently codenamed Sid (after the neighbor boy who breaks toys in Toy Story (all the releases of Debian are named after Toy Story characters) and also because it stands for Still In Develoment). It is the bleeding edge of Debian, and it is practically guaranteed that some of the packages won't work. Don't use Sid unless you enjoy filling out bug reports.

Upgrading to a Different Branch
Sometimes, you will want to upgrade to a different branch (especially because of the misunderstanding over the meaning of the stable branch). It is fairly easy to upgrade to a different branch, from stable to testing, or testing to unstable. But it is very hard to downgrade to a different branch!

The first step is to close out of any GUI environment you are using, such as KDE or Gnome.

The second step is to edit the /etc/apt/sources.list file. As always when editing important system files, it is best to make these edits reversible. Either copy the file to a slightly different file name (such as sources.bac) or comment out the old lines and add new lines based on the old ones.

Replace all mention in the old uncommented lines of your current branch (stable or testing) and replace them with the branch you want (testing or unstable). Save the changes and exit the editor.

Run the command apt-get update. Apt-get may download a few files and install them, it won't take long.

Then run the command apt-get -u dist-upgrade. This will involve a lot of downloading. Now would be a good time to take a nap or get something to eat. After about half an hour of downloading packages, you will have to walk through some configuration.

After all the downloads have completed and the various install scripts have run, you'll be running the new branch. You may now run aptitude or another apt related tool to get new packages, or else restart your GUI and get back to work!