apt – How to Fix Mismatched Release and sources.list

aptsoftware-sources

I have what looks like Groovy installed:

~ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.10 (Groovy Gorilla)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.10"
VERSION_ID="20.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=groovy
UBUNTU_CODENAME=groovy

But when I look at my sources list I see focal sources:

~ cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ focal restricted main universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates universe multiverse restricted main
deb http://archive.ubuntu.com/ubuntu/ focal-security restricted main multiverse universe
deb http://archive.ubuntu.com/ubuntu/ focal-backports universe main restricted multiverse
deb http://archive.canonical.com/ubuntu focal partner

When I use software updater it does not offer me a dist upgrade to 22.04 LTS.

The presenting problem is that I cannot install DisplayLink drivers. The installation binary complains that libc6 is not available. I think that actually it's just a version incompatibility – because it definitely is installed.

I'm encountering some other things that make me suspect that my apt sources are wrong; For example when I tried to install curl it complained that my libcurl version was too high. I needed to lower the version of the installed library before I could install curl. I'm guessing that this could be related to the sources list.

Is the mismatch between release and sources.list a problem and how can I fix it?

Best Answer

The fastest, safest, and surest alternative is to backup your data and clean-install Ubuntu 22.04.

We could fill several paragraphs describing all the possible causes from the issues you described: EOL listing, wrong-version packages, apt already complaining about version mismatches, and not being offered LTS. But that would not help unless you have the skill to test, troubleshoot, diagnose, and repair those causes. Such repairs would require considerable training and take far longer than a simple reinstall.

The base cause underlying all the symptoms described is a human making mistakes in system administration. Ubuntu systems simply don't change releases, nor fall into version conflicts, unless the human admin has so directed. Another reason to wipe away long-forgotten mistakes and start clean.