Upgrading Debian from stable to testing

Upgrading Debian from stable to testing

Debian logoI’ve been using Debian GNU/Linux for many years and have been very pleased with its stability, reliability and security.

Yesterday I decided to do something I’ve never done before: upgrade a production machine from Debian stable (codename ‘wheezy’) to Debian testing (codename ‘jessie’). See this guide for an explanation of Debian versions and releases.

Anyway, after installing the apt-listbugs package which a Bristol Wireless colleague recommended, I then proceeded with the upgrade via the command line.

The sequence of commands to perform the upgrade itself is very easy.

# cp /etc/apt/sources.list{,.bak}
# sed -i -e ‘s/ \(stable\|wheezy\)/ testing/ig’ /etc/apt/sources.list
# apt-get update
# apt-get –download-only dist-upgrade
# apt-get dist-upgrade

The first command backs up the software sources list, whilst the second edits the sources list to replace release versions. After that, the actual fun begins, downloading updated package information, downloading the packages themselves and then installing them.

All told, it went very smoothly. The laptop rebooted normally after the upgrade and brought up the GUI. The only major problem was that I lost the functionality of the Broadcom wireless network card; this was resolved by reinstalling the card’s firmware – a 2 minute job. The upgrade also resulted in 2 packages being broken. The command (as root) for fixing this problem is apt-get -f install.

In total, the upgrade took about 2 hours and I now have a machine running a more modern version of Debian on the same machine and have kept all my previous personal settings, which is a definite plus compared with a clean install where one has to spend hours reinstalling software packages not included in the ISO disc image and tweaking.

Author: Steve Woods

Generic carbon-based humanoid life form.