System backup.
Check package status: show any packages which have a status of Half-Installed
or Failed-Config
, and those with any error status.
$ dpkg --audit
Inspect the status of all the packages on your system using aptitude
GUI or dpkg
on the command line.
$ dpkg -l | pager $ dpkg --get-selections "*" > curr-pkgs.txt
Check packages that are held by aptitude
.
$ aptitude search "~ahold"
Set those packages held by aptitude
to unhold
state.
$ aptitude unhold package_name
Check packages that are held by apt-get
.
$ dpkg --get-selections | grep ‘hold$‘
Set those packages held by apt-get
to install
state.
$ echo package_name install | dpkg --set-selections
Remove or comment "proposed-updates" section in /etc/apt/sources.list
.
Change the version name in sources.list
, then update the package index.
$ apt-get update
Perform minimal system upgrade.
$ apt-get upgrade
Perform full system upgrade.
$ apt-get dist-upgrade
General procedures for upgrading Debian
原文:https://www.cnblogs.com/quantumman/p/14119783.html