16.04.7 LTS: Owncloud installed & un-installed, apt-get update gives Err:11 ... "The following signatures were invalid..."

I would like to fully upgrade this system to the latest LTS. But first I would like to feel the current 16.04.7 LTS is clean. I tried to install Owncloud years ago with limited success and then uninstalled it. Unfortunately, my system thinks it's still installed and has issues.

Currently sudo apt-get update yields the following:

Ign:8 https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04  InRelease

Get:10 https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04  Release [976 B]

Get:11 https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04  Release.gpg [481 B]

Err:11 https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04  Release.gpg
  The following signatures were invalid: DDA2C105C4B73A6649AD2BBD47AE7F72479BC94B

How do I begin addressing this issue? Thank you!

Here is the result of requested ls command:

$ ls -l /etc/apt/sources.list.d/
total 16
-rw-r--r-- 1 root root  58 Sep  7  2020 nonfree.list
-rw-r--r-- 1 root root  79 Nov 17  2017 owncloud.list
-rw-r--r-- 1 root root 226 Nov 14  2017 plexmediaserver.list
-rw-r--r-- 1 root root  65 Sep  7  2020 webmin.list

Solution 1:

apt keeps software packages separate from the sources that provide those packages.

You can uninstall software, but that doesn't remove the source that the package came from. That would be a bad idea: Most folks get most of their software from a few sources, and Ubuntu sources are just like every other source (not special).

So a source must be cleaned up separately when the admin (you) determines that software from that particular source is no longer welcome.

Apt stores package sources in two locations:

  • Ubuntu default sources are stored in a text file located at /etc/apt/sources.list
  • Other sources are stored as separate text files in the directory /etc/apt/sources.list.d/

For example, your output clearly shows your Owncloud source is in that directory: It's /etc/apt/sources.list.d/owncloud.list

  1. Remove the source. In this case, simply delete the file.

    sudo rm /etc/apt/sources.list.d/owncloud.list

  2. Since you have changed your sources, remember to update apt's database of sources and packages.

    sudo apt update


The instructions would be slightly different if the source were in the other location (merely edit the file instead of deleting the file).

Ubuntu Desktop users can optionally use their Software & Updates application to control sources instead of mucking about with shell commands. It's included with Ubuntu Desktop -- look for it using your Desktop Search.

Also, recall that this answer is about apt and deb packages only. apt has never heard of snaps or flatpaks or applimages or pip wheels or any other packaging method, and problems with non-deb packages won't be fixed by changing apt sources.