Just look for the repository entry and delete it from the file.

sudo nano /etc/apt/sources.list

Optionally one can remove repository using add-apt-repository command

sudo add-apt-repository -r ppa:PPA_REPOSITORY_NAME/PPA

To delete repository key, fist list them and fine the problematic one.

sudo apt-key list

This command will list all added repository keys

/etc/apt/trusted.gpg
 pub   rsa4096 2015-07-25 [SC] [expired: 2019-07-25]
       EDB7 D030 4E2F CAF6 29DF  1163 0757 21F6 A224 060A
 uid           [ expired] openHAB Bintray Repositories owner@openhab.org
 /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-archive.gpg
 pub   rsa4096 2012-05-11 [SC]
       790B C727 7767 219C 42C8  6F93 3B4F E6AC C0B2 1F32
 uid           [ unknown] Ubuntu Archive Automatic Signing Key (2012) ftpmaster@ubuntu.com

In this case to remove one related to “openHAB Bintray Repositories” (specify at least the last 8 characters of the key)

sudo apt-key del A224 060A

Tip: In may case the problematic repository was in /etc/apt/sources.list.d/ openhab2.list , so I removed the whole file.

Manage Ubuntu repositories and keys

Leave a Reply

Your email address will not be published. Required fields are marked *