hamwaves.com
;

How to do a Xubuntu LTS Release Upgrade

Serge Y. Stroobandt

Copyright 2014–2020, licensed under Creative Commons BY-NC-SA

  1. Home
  2. Information Technology
  3. Desktop Systems
  4. Xubuntu LTS Release Upgrade

Introduction

Here is something what Linux Mint does not do: release upgrades! ☺ Coincidentally, this happens to be the very reason why I prefer using Xubuntu LTS as my daily driver over any Linux Mint distribution. Over the years, I stuck with Xubuntu LTS because of the relatively seamless distribution upgrades on computers that age little because of the reputed resource friendliness of GNU/Linux. So, here is a little guide about how you should go about a distribution upgrade. It focusses on Xubuntu LTS, but can be readily applied to any Debian based distribution.

Only install LTS versions

If you do not want to spend even more time behind your work computer, then install only long-term supported (LTS) *Ubuntu releases as your main operating system. Point releases are best left aside for experimental installations on virtual machines.

Wait for release XX.04.01

Once you are on an LTS release, do not jump straight away on the next LTS release when it becomes available in the month of April of even years. The reason is simple: LTS releases may still contain a small number of annoying bugs. Sit back, have patience and wait until the end of August for the first LTS point release. Have others struggle and complain about these bugs, while you keep your daily working environment sane. The update manager usually tell when the XX.04.01 release is available for download.

Of course, as a routine user, you should always try to give back to your favourite open source operating system in the form of testing and filing bugs. However, as stated before, do this from within a virtual machine; not your daily driver machine.

Clean out sources.list.d

Over the life span of a release, you may have accumulated a number of custom private package archive (PPA) repositories in your apt sources.list for numerous projects that were not supported by the main repositories. It is time to clear these PPAs out now, because these external repositories may interfere with the distribution upgrade. These PPAs used to be listed inside a sources.list file, but nowadays they are located as separate files inside a sources.list.d file directory.

Modern systems

All PPA files inside /etc/apt/sources.list.d/ can have their contents edited automatically all at once using the following commands. How this works is further explained in my find tutorial.

$ cd /etc/apt/sources.list.d/
$ sudo find . -type f -readable -writable -exec sed -i 's/xenial/bionic/g' {} \;

Finally, use the rename command to also rename all these /etc/apt/sources.list.d/ files all at once:

$ sudo apt install rename
$ sudo rename 's/xenial/bionic/' *

Legacy systems

Legacy systems with a single sources.list file mentioning the PPAs are maintained as follows:

$ cd /etc/apt
$ sudo cp sources.list sources.list.bup
$ sudo vim sources.list

In the sources.list file, comment out with a pound # all deb and deb-src lines below the following lines:

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.

Find the fastest repository

Unfortunately, the Debian netselect-apt command line tool for finding out the fastest —not the closest!— repository is not available in Ubuntu. Hence, the following steps in the graphical user interface are necessary to perform this task:

  1. Open Update Manager.
  2. Click on the Settings… button.
  3. Select the Ubuntu Software tab.
  4. In the Download from: selector, choose Other….
  5. Click on the Select Best Server button and wait.
  6. Once finished, click on the Choose Server button.
  7. Click on Close.
  8. Click on Reload and wait.
  9. Finally, click on the Close button to close the Update Manager.

Upgrade from within TTY2

Hit Ctrl+Alt+F2 to go to terminal TTY2. This will prevent xscreensaver lock-outs. TTY1 is avoided because during the upgrade it will get inundated with numerous system messages.

It might be that you never tried your TTY screens before and that these turn out to be blank without any login prompt. If this is the case, than edit /etc/default/grub as shown below:

$ sudo vim /etc/default/grub

Uncomment the line GRUB_TERMINAL=console. After performing this edit, do not forget to reboot:

$ sudo update-grub
$ sudo reboot -n

Once TTY2 is working, it is now time to issue the distribution upgrade command:

$ sudo do-release-upgrade

Clean up after the upgrade

http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies

$ sudo apt-get autoclean
$ sudo apt-get -f install
0 upgraded, 0 newly installed, 0 to remove and 79 not upgraded.
$ sudo apt-get -u dist-upgrade

Rare i386 dependencies

Nowadays, one will most probably no longer run into 32‑bit i386 dependencies. Nonetheless, below solution is retained for legacy systems.

Example problem:

The following packages have unmet dependencies:
 wine1.6 : Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu4) but it is not installable
E: Unable to correct problems, you have held broken packages.

Solution:

$ sudo dpkg --add-architecture i386
$ sudo apt-get update

Check every PPA before restoring

Prior to restoring, every PPA line should be checked, and where necessary, edited for the proper Ubuntu release version. Restore /etc/apt/sources.list.

5
Creative Commons Licence
This work is licensed under a Creative Commons Attribution‑NonCommercial‑ShareAlike 4.0 International License.
Other licensing available on request.
GNU GPL v3
Unless otherwise stated, all originally authored software on this site is licensed under the terms of GNU GPL version 3.
cookie
This static web site has no backend database.
Hence, no personal data is collected and GDPR compliance is met.
Moreover, this domain does not set any first party cookies.

All Google ads shown on this web site are, irrespective of your location,
restricted in data processing to meet compliance with the CCPA and GDPR.
However, Google AdSense may set third party cookies for traffic analysis and
use JavaScript to obtain a unique set of browser data.
Your browser can be configured to block third party cookies.
Furthermore, installing an ad blocker like EFF's Privacy Badger
will block the JavaScript of ads.
Google's ad policies can be found here.
This page employs a Python Bottle server‑side script.
This page includes an open-source client-side script, written in Python and
transcoded by Brython to make it run as secure JavaScript in the browser.
Static XHTML generated from Markdown by Pandoc and
the GNU/Linux make, sed and gpp commands.
LaTeXmath markup rendered with MathJax.
BibTeX references are best read with JabRef.
Unattended CSS typesetting with Prince.
This work is published at https://hamwaves.com/release-upgrade/en/.
profile for Serge Stroobandt on Stack Exchange, a network of free, community-driven Q&A sites
GnuPG
Use my OpenPGP public key to encrypt messages for:

echo c2VyZ2VAc3Ryb29iYW5kdC5jb20K |base64 -d
Last update: Wednesday, September 1, 2021.