6

apt-get update after upgrade - I get following message

W: GPG error: http://archive.canonical.com/ubuntu xenial InRelease: At least one invalid signature was encountered.
W: The repository 'http://archive.canonical.com/ubuntu xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial InRelease: At least one invalid signature was encountered.
W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-security InRelease: At least one invalid signature was encountered.
W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-security InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-updates InRelease: At least one invalid signature was encountered.
W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-updates InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-proposed InRelease: At least one invalid signature was encountered.
W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-proposed InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-backports InRelease: At least one invalid signature was encountered.
W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-backports InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Tried

sudo apt-get clean
sudo mv /var/lib/apt/lists /tmp
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update

It did not help.

My current source.list:

###### Ubuntu Main Repos
deb http://ua.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://ua.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse 
deb http://ua.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse 
deb http://ua.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse 
deb http://ua.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu xenial partner
4
  • It looks like you don't have permission to download from that repository as it kept asking for permissions, go to software and updates and check the unchecked update settings and try again. Nov 15 '16 at 18:56
  • I don't have access to the GUI. Is there a console solution?
    – Davinel
    Nov 15 '16 at 18:59
  • I'm afraid I'm not familiar with a terminal way to alter the settings, but since you seem to have more than one issue. I'll advise you to download an image of 16.04.1 and install it, it will detect your settings from the previous install. Nov 15 '16 at 19:02
  • 1
    Are you behind a HTTP proxy by any chance? What's the output of ls -l /etc/apt/trusted.gpg* /usr/share/keyrings and dpkg-query -S /usr/share/keyrings | sed -e 's/:.*$//;s/, /\n/g' | xargs apt-cache policy? By the way, none of these are actual errors, only warning or notes as shown by the W: and N:. You should be able to continue to use the package repositories albeit with the lack of securely signed repository data and packages. Nov 15 '16 at 19:17
6

Fixed it with rm -rf /etc/apt/trusted.gpg.d/*

Apparently, gpg of some old repository was messing things up, despite those repositories being disabled..

2
  • If that fixed it for you, please mark it as an answer for it to be closed. Nov 15 '16 at 21:15
  • That fixed same problem for me. thx.
    – oren
    Nov 24 '16 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.