I got the same error, also going via apt-cacher-ng:
$ sudo apt-get update Hit:1 http://gb.archive.ubuntu.com/ubuntu jammy InRelease Get:2 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB] Get:3 http://gb.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB] Hit:4 https://ppa.launchpadcontent.net/gns3/ppa/ubuntu jammy InRelease Hit:5 https://download.docker.com/linux/ubuntu jammy InRelease Get:6 http://gb.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Err:2 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease The following signatures were invalid: BADSIG 871920D1991BC93C Ubuntu Archive Automatic Signing Key (2018) <email address hidden> Hit:7 https://packagecloud.io/netdata/netdata/ubuntu jammy InRelease Hit:8 https://packagecloud.io/netdata/netdata-repoconfig/ubuntu jammy InRelease Hit:9 https://apt.syncthing.net syncthing InRelease Fetched 324 kB in 2s (148 kB/s) Reading package lists... Done W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease: The following signatures were invalid: BADSIG 871920D1991BC93C Ubuntu Archive Automatic Signing Key (2018) <email address hidden> W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease The following signatures were invalid: BADSIG 871920D1991BC93C Ubuntu Archive Automatic Signing Key (2018) <email address hidden> W: Some index files failed to download. They have been ignored, or old ones used instead.
Note that in my case the error was for "jammy-updates".
The solution for me was:
$ sudo rm -rf /var/cache/apt-cacher-ng/uburep/dists/jammy-updates/
Then:
$ sudo apt-get update Hit:1 http://gb.archive.ubuntu.com/ubuntu jammy InRelease Get:2 http://gb.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB] Get:3 http://gb.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Get:4 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB] Hit:5 https://ppa.launchpadcontent.net/gns3/ppa/ubuntu jammy InRelease Hit:6 https://download.docker.com/linux/ubuntu jammy InRelease Hit:7 https://apt.syncthing.net syncthing InRelease Get:8 http://gb.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [795 kB] Get:9 http://gb.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [177 kB] Get:10 http://gb.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [521 kB] Get:11 http://gb.archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [79.7 kB] Hit:12 https://packagecloud.io/netdata/netdata/ubuntu jammy InRelease Hit:13 https://packagecloud.io/netdata/netdata-repoconfig/ubuntu jammy InRelease Fetched 1,897 kB in 2s (938 kB/s) Reading package lists... Done $
Hence getting into this bad state looks like some internal problem with apt-cacher-ng.
I got the same error, also going via apt-cacher-ng:
$ sudo apt-get update gb.archive. ubuntu. com/ubuntu jammy InRelease gb.archive. ubuntu. com/ubuntu jammy-updates InRelease [114 kB] gb.archive. ubuntu. com/ubuntu jammy-backports InRelease [99.8 kB] /ppa.launchpadc ontent. net/gns3/ ppa/ubuntu jammy InRelease /download. docker. com/linux/ ubuntu jammy InRelease gb.archive. ubuntu. com/ubuntu jammy-security InRelease [110 kB] gb.archive. ubuntu. com/ubuntu jammy-updates InRelease /packagecloud. io/netdata/ netdata/ ubuntu jammy InRelease /packagecloud. io/netdata/ netdata- repoconfig/ ubuntu jammy InRelease /apt.syncthing. net syncthing InRelease gb.archive. ubuntu. com/ubuntu jammy-updates InRelease: The following signatures were invalid: BADSIG 871920D1991BC93C Ubuntu Archive Automatic Signing Key (2018) <email address hidden> gb.archive. ubuntu. com/ubuntu/ dists/jammy- updates/ InRelease The following signatures were invalid: BADSIG 871920D1991BC93C Ubuntu Archive Automatic Signing Key (2018) <email address hidden>
Hit:1 http://
Get:2 http://
Get:3 http://
Hit:4 https:/
Hit:5 https:/
Get:6 http://
Err:2 http://
The following signatures were invalid: BADSIG 871920D1991BC93C Ubuntu Archive Automatic Signing Key (2018) <email address hidden>
Hit:7 https:/
Hit:8 https:/
Hit:9 https:/
Fetched 324 kB in 2s (148 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://
W: Failed to fetch http://
W: Some index files failed to download. They have been ignored, or old ones used instead.
Note that in my case the error was for "jammy-updates".
The solution for me was:
$ sudo rm -rf /var/cache/ apt-cacher- ng/uburep/ dists/jammy- updates/
Then:
$ sudo apt-get update gb.archive. ubuntu. com/ubuntu jammy InRelease gb.archive. ubuntu. com/ubuntu jammy-backports InRelease [99.8 kB] gb.archive. ubuntu. com/ubuntu jammy-security InRelease [110 kB] gb.archive. ubuntu. com/ubuntu jammy-updates InRelease [114 kB] /ppa.launchpadc ontent. net/gns3/ ppa/ubuntu jammy InRelease /download. docker. com/linux/ ubuntu jammy InRelease /apt.syncthing. net syncthing InRelease gb.archive. ubuntu. com/ubuntu jammy-updates/main amd64 Packages [795 kB] gb.archive. ubuntu. com/ubuntu jammy-updates/main Translation-en [177 kB] gb.archive. ubuntu. com/ubuntu jammy-updates/ restricted amd64 Packages [521 kB] gb.archive. ubuntu. com/ubuntu jammy-updates/ restricted Translation-en [79.7 kB] /packagecloud. io/netdata/ netdata/ ubuntu jammy InRelease /packagecloud. io/netdata/ netdata- repoconfig/ ubuntu jammy InRelease
Hit:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Hit:5 https:/
Hit:6 https:/
Hit:7 https:/
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Hit:12 https:/
Hit:13 https:/
Fetched 1,897 kB in 2s (938 kB/s)
Reading package lists... Done
$
Hence getting into this bad state looks like some internal problem with apt-cacher-ng.