Upgraded to Debian 10 but apt update still using stretch
I have upgraded to Debian 10, but I must have done something wrong. Running lsb_release -a produces:
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
But running sudo apt-get update produces:
Hit:1 http://mirrors.linode.com/debian buster InRelease
Hit:2 http://mirrors.linode.com/debian-security buster/updates InRelease
Hit:3 http://mirrors.linode.com/debian buster-updates InRelease
Hit:4 http://repo.mysql.com/apt/debian stretch InRelease
Err:5 https://packages.sury.org/php stretch InRelease
403 Forbidden [IP: 143.244.38.137 443]
Err:4 http://repo.mysql.com/apt/debian stretch InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8C718D3B5072E1F5
Reading package lists... Done
E: Failed to fetch https://packages.sury.org/php/dists/stretch/InRelease 403 Forbidden [IP: 143.244.38.137 443]
E: The repository 'https://packages.sury.org/php stretch InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com/apt/debian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8C718D3B5072E1F5
Note it seems to still be trying to use "stretch".
Any ideas what I might have done wrong?
1 Reply
Hey @sparestrawberry
It looks like you'll need to update your /etc/apt/source.list file to pull from the Buster repositories instead of the Stretch repos.
This Community Questions post titled How to Upgrade Debian 9 to 10 on Linode has instructions for making those changes.
Once you do that you should be good to go.
One last thing to mention is that when you're upgrading your distribution, I recommend spinning up a new Linode running the distribution of your choice then copying your data and configuration files from your origin server to your new server. Generally speaking, this method leaves less room for things to break within your instance.
More detailed instructions for this process can be found in the How to Upgrade a Linux System to the Latest Distribution guide.