General procedures for upgrading Debian

  1. System backup.

  2. Check package status: show any packages which have a status of Half-Installed or Failed-Config, and those with any error status.

    $ dpkg --audit
  3. 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
  4. Check packages that are held by aptitude.

    $ aptitude search "~ahold"
  5. Set those packages held by aptitude to unhold state.

    $ aptitude unhold package_name
  6. Check packages that are held by apt-get.

    $ dpkg --get-selections | grep 'hold$'
  7. Set those packages held by apt-get to install state.

    $ echo package_name install | dpkg --set-selections
  8. Remove or comment "proposed-updates" section in /etc/apt/sources.list.

  9. Change the version name in sources.list, then update the package index.

    $ apt-get update
  10. Perform minimal system upgrade.

    $ apt-get upgrade
  11. Perform full system upgrade.

    $ apt-get dist-upgrade
原文地址:https://www.cnblogs.com/quantumman/p/14119783.html