I am running a server that has been recently upgraded-in-place to 18.04 / Bionic, from 16.04 / Xenial.
During the upgrade, when it came time to ask me if I wanted to remove the obsolete packages, I didn't get a chance to state my intent either way, because when I went to look at the list - and I was keying directly into the server, not using SSH - the keyboard and my state in the upgrade process decided to have a divorce. I couldn't get back to any kind of menu and so I just rebooted and hoped 18.04 would come up. It looked like it did (and it proclaims "Welcome to Ubuntu 18.04.5 LTS" when you sign into it), and as far as the things the server needs to do to earn its keep, it is still doing them. But apt is still looking for Xenial updates instead of Bionic updates.
(I previously asked the question Apt upgrade error: distro-info-data breaks distro-info about distro-info-data breaking distro-info, but it seems like that was just a symptom of this much larger problem.)
Running grep "^deb\ " -r /etc/apt/ --include=*.list
produces:
/etc/apt/sources.list.d/certbot-ubuntu-certbot-xenial.list:deb http://ppa.launchpad.net/certbot/certbot/ubuntu xenial main
/etc/apt/sources.list.d/ondrej-ubuntu-php-xenial.list:deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial main restricted
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial universe
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial-updates universe
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial multiverse
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security multiverse
What can I put into apt to make it look to the Bionic repositories instead of the Xenial ones?
/etc/apt/sources.list.d
and didn't runsed
on them. I deleted them instead and re-added the PPAs for them, since I wasn't sure if their contents would still be meaningful when modified. – Eric Hu Oct 13 '21 at 08:52