如何升级 Debian 9 (Stretch) 到 Debian 10 (Buster)
Buster Full Upgrade
Before we move on with the upgrade, let's fully upgrade our current Debian Jessie system:
# apt-get update
# apt-get upgrade
# apt-get dist-upgrade
If everything went smoothly, perform database sanity and consistency checks for partially installed, missing and obsolete packages:
# dpkg -C
If no issues are reported, check what packages are held back:
# apt-mark showhold
Packages
On Hold
will not be upgraded, which may cause inconsistencies after Buster upgrade. Before you move to the next part, it is recommended to fix all issues produced by both above commands. The following command might be of a further assistance:
# dpkg --audit
Update Package Repository to Debian Buster
Now, that we have a current system fully upgraded, it is time to re-synchronize the package index files with new Debian Buster sources. This is done by editing
/etc/apt/sources.list
file to include
Debian
stretch
package repository
. First, make a backup the current
/etc/apt/sources.list
:
# cp /etc/apt/sources.list /etc/apt/sources.list_backup
Execute
apt edit-sources
or use your favourite text editor e.g.,
VIM
to modify a current
/etc/apt/sources.list
file to include stretch repositories. Simply update keyword
stretch
to
buster
.
Example:
FROM STRECTH:
deb http://httpredir.debian.org/debian stretch main
deb http://httpredir.debian.org/debian stretch-updates main
deb http://security.debian.org stretch/updates main
TO BUSTER:
deb http://httpredir.debian.org/debian buster main
deb http://httpredir.debian.org/debian buster-updates main