Category: Debian
Created: 2020-08-17
Updated: 2024-09-20
As of Debian 8, upgrading a Debian installation to the next major version number works quite smoothly. Depending on the speed of the server and the duration of the reboot, an upgrade is usually completed in under 15 minutes.
Always upgrade Debian Linux from one version to the next higher, do not skip versions!
To upgrade a server from Debian 8 to Debian 10, you must first upgrade from 8 to 9 and then from 9 to 10. Reboot the server after each upgrade!
Follow the steps below to upgrade:
/etc/apt/sources.list (replace stretch with buster)/etc/apt/sources.list.d/liveconfig.list for the LiveConfig PHP repository in the same wayapt updateapt install apt dpkgapt upgradeapt full-upgrade. While running, you will be asked whether some existing configuration files should be replaced - in most cases it is better to keep the existing configuration (answer with no).apt-get autoremove to remove all packages that are no longer requiredMariaDB gets updated from version 10.1.48 to 10.3.39. This changes the default SQL_MODE:
NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTIONSTRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTIONThe new option STRICT_TRANS_TABLES can lead to errors in some (mostly old) applications. To retain the “old” SQL_MODE, create a file /etc/mysql/mariadb.conf.d/99-sql-mode.cnf with the following content:
[mariadb]
sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Then restart MariaDB (systemctl restart mariadb).
If you have any other issues, please let us know so we can update this article accordingly.
Additionally you may have a look at the possible problems while upgrading Debian 8 to 9.
Some things have changed with Debian Buster (see What’s new in the Buster release?). The major changes are:
root user by using the su command, the PATH variable will not be altered any more to contain /sbin and /usr/sbin! The workarounds are:
su - instead (add a dash), this launches a new login shellsudo (like on Ubuntu ;-)ALWAYS_SET_PATH yes in /etc/login.defs to get the “old” behaviour back/bin, /sbin and /lib* will be installed in their /usr counterpart by default. /bin, /sbin and /lib* will be soft-links pointing to /usr/... - see Debian manual.