{"id":54,"date":"2022-10-10T11:05:27","date_gmt":"2022-10-10T09:05:27","guid":{"rendered":"https:\/\/untanux.lt\/?p=54"},"modified":"2022-10-10T11:05:27","modified_gmt":"2022-10-10T09:05:27","slug":"debian-upgrade-from-stretch-to-buster","status":"publish","type":"post","link":"https:\/\/untanux.lt\/?p=54","title":{"rendered":"Debian upgrade from Stretch to Buster"},"content":{"rendered":"\n<p>Key to success: less software installed on your system, the higher chance for a successful upgrade. The chances for a successful and fully functional upgrade are decreased by a number of 3rd-party packages installed on your current system. From this reason, remove any obsolete standard repository and 3rd-party software before you attempt the upgrade. The <code>aptitude<\/code> command might help you to find any 3rd party software package currently installed on your Debian system.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong># aptitude search '~i(!~ODebian)'<\/strong>\n<\/pre>\n\n\n\n<p>The above command will list all packages which are no longer in a standard repository list since they were removed; thus they were rendered obsolete, or the 3rd party packages which were installed manually.<\/p>\n\n\n\n<p>Perform a full backup of data and manual configuration files residing on your current system. For example, these may include but not limited to user home directories, databases, websites, etc. In case you run Debian Linux virtually take a snapshot just in case something goes wrong during the Buster upgrade.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Buster Full Upgrade<\/h2>\n\n\n\n<p>Before we move on with the upgrade, let\u2019s fully upgrade our current Debian Jessie system:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong># apt-get update\n# apt-get upgrade\n# apt-get dist-upgrade<\/strong>\n<\/pre>\n\n\n\n<p>If everything went smoothly, perform database sanity and consistency checks for partially installed, missing and obsolete packages:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong># dpkg -C<\/strong>\n<\/pre>\n\n\n\n<p>If no issues are reported, check what packages are held back:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong># apt-mark showhold<\/strong>\n<\/pre>\n\n\n\n<p>Packages <code>On Hold<\/code> 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:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong># dpkg --audit<\/strong>\n\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Update Package Repository to Debian Buster<\/h2>\n\n\n\n<p>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 <code>\/etc\/apt\/sources.list<\/code> file to include <a href=\"https:\/\/linuxconfig.org\/debian-apt-get-stretch-sources-list\">Debian <code>stretch<\/code> package repository<\/a>. First, make a backup the current <code>\/etc\/apt\/sources.list<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># <strong>cp \/etc\/apt\/sources.list \/etc\/apt\/sources.list_backup<\/strong>\n<\/pre>\n\n\n\n<p>Modify a current <code>\/etc\/apt\/sources.list<\/code> file to include stretch repositories or simply update keyword <code>stretch<\/code> to <code>buster<\/code>.I use a <code>sed<\/code> command to automate this tedious task:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#<strong> sed -i 's\/stretch\/buster\/g' \/etc\/apt\/sources.list<\/strong>\n<\/pre>\n\n\n\n<p>Once the above <code>\/etc\/apt\/sources.list<\/code> file edit is completed, use <code>apt<\/code> command to update packages index:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong># apt update<\/strong>\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Upgrade to Debian Buster Simulation<\/h2>\n\n\n\n<p>Before we hit the UPGRADE button, let\u2019s use <code>apt<\/code> command to see a preview of what we are facing. To do this execute <code>apt list --upgradable<\/code> command in order to get a quick survey of the number of packages to be installed, updated and removed without affecting the system.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># <strong>apt list --upgradable<\/strong>\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Upgrade to Debian Buster<\/h2>\n\n\n\n<p>We have come to the most exciting part, which is the actual Stretch upgrade to Debian Buster system. During the upgrade you may be asked:<\/p>\n\n\n\n<pre id=\"block-e2b22725-a79a-4dfe-b78b-f95bbc52e583\" class=\"wp-block-preformatted\"><strong># aptitude search '~i(!~ODebian)'<\/strong><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Restart services during package upgrades without asking?<\/strong><\/p><\/blockquote>\n\n\n\n<p>The choice is about whether you wish the system to restart your services automatically during the system upgrade or you wish to do it manually or after the system is fully upgrade to Buster. When ready, execute the bellow commands to commence the Debian Buster upgrade process:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong># apt-get upgrade\n# apt-get dist-upgrade\n<\/strong><\/pre>\n\n\n\n<p>At this stage you should have your Stretch Debian Linux system fully upgraded to Debian Buster 10. Follow, this guide to <a href=\"https:\/\/linuxconfig.org\/check-what-debian-version-you-are-running-on-your-linux-system\">check your current Debian version<\/a>.<br>Once again check for obsolete packages so there are no surprises down the track:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong># aptitude search '~i(!~ODebian)'<\/strong>\n<\/pre>\n\n\n\n<p>Congratulations to your fully upgraded Debian 10 Buster Linux system.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>For this upgrade manual all credits go to: <a href=\"https:\/\/linuxconfig.org\/how-to-upgrade-debian-9-stretch-to-debian-10-buster\">https:\/\/linuxconfig.org\/how-to-upgrade-debian-9-stretch-to-debian-10-buster<\/a><\/strong><\/p>\n\n\n\n<p>Thank you very much for your manual. Very useful. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Key to success: less software installed on your system, the higher chance for a successful upgrade. The chances for a successful and fully functional upgrade are decreased by a number of 3rd-party packages installed on your current system. From this reason, remove any obsolete standard repository and 3rd-party software before you attempt the upgrade. The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/untanux.lt\/index.php?rest_route=\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/untanux.lt\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/untanux.lt\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/untanux.lt\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/untanux.lt\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":0,"href":"https:\/\/untanux.lt\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"https:\/\/untanux.lt\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/untanux.lt\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/untanux.lt\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}