[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ A ] [ next ]

Debian Quick Reference
Chapter 2 - Upgrading a distribution to stable, testing, or unstable

2.1 Upgrading from Potato to Woody

This procedure is described separately because Potato's APT did not have all the features described in the current apt_preferences(5) manpage.

After including only Woody sources in /etc/apt/sources.list, upgrade APT and required core packages to Woody versions by doing the following:

     # apt-get update
     # apt-get install libc6 perl libdb2 debconf
     # apt-get install apt apt-utils dselect dpkg

Then upgrade the rest of the system to Woody.

     # apt-get upgrade
     # apt-get dist-upgrade

2.2 Preparing for upgrade

You can upgrade from one distribution to another one by fetching packages over the network. This can be done as follows.

Get a clean list of repositories for stable:

     # cd /etc/apt
     # cp -f sources.list sources.list.old
     # :>sources.list  
     # apt-setup noprobe

If you want to upgrade to testing then add testing sources to this new list. If you want to upgrade to unstable then also add unstable sources.

     # cd /etc/apt
     # grep -e "^deb " sources.list >srcs
     # :>sources.list  
     # cp -f srcs sources.list
     # sed -e "s/stable/testing/" srcs >>sources.list
     # sed -e "s/stable/unstable/" srcs >>sources.list
     # apt-get update
     # apt-get install apt apt-utils

See Beginning Debian package management, Section 3.2 for the art of tuning /etc/apt/sources.list and /etc/apt/preferences.

2.3 Upgrading

After properly setting up /etc/apt/sources.list and /etc/apt/preferences as described above you can begin the upgrade.

Note that tracking the testing distribution of Debian can have the side effect of delaying the installation of packages containing security fixes, since such packages are uploaded to unstable and only later migrate to testing.

See Debian package management, Chapter 3 for the basics, and see APT upgrade troubleshooting, Section 3.3.2 if you encounter problems.

2.3.1 Using dselect

If a system has many packages which include -dev packages, etc., the following method using dselect is recommended for fine-grained package control.

     # dselect update  # always do this before upgrade
     # dselect select  # select additional packages

All your current packages will be selected when dselect starts. dselect may prompt you with additional packages based on Depends, Suggests, and Recommends. If you do not want to add any packages, just type Q to exit dselect again.

     # dselect install

You will have to answer some package configuration questions during this part of the process, so have your notes ready and allow some time for this part. See dselect, Section 3.2.4.

Use dselect. It always works :)

[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ A ] [ next ]

Debian Quick Reference

CVS, Thu Jan 18 11:54:29 UTC 2007

Osamu Aoki osamu#at#debian.org
Authors, Section A.1