0

How can I remove a repository from apt-get? I know this is a duplicate, but the existing answers didn't work for me.

When I run apt-get update I'm getting the following error:

Err:13 https://dl.winehq.org/wine-builds/ubuntu xenial InRelease                                                            
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.winehq.org/wine-builds/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F

I don't need wine anymore so I've been trying to remove it.

When I run sudo apt-cache policy, I can see Wine's repository listed as follows:

500 https://dl.winehq.org/wine-builds/ubuntu xenial/main i386 Packages
 release v=16.04,o=dl.winehq.org,a=xenial,n=xenial,l=winehq,c=main,b=i386
 origin dl.winehq.org
500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
 release v=16.04,o=dl.winehq.org,a=xenial,n=xenial,l=winehq,c=main,b=amd64
 origin dl.winehq.org

I've tried various different syntaxes to remove the repository but nothing works. Here are some of the things I tried:

sudo add-apt-repository --remove ppa:https://dl.winehq.org/wine-builds/ubuntu
sudo apt-add-repository --remove 'deb https://dl.winehq.org/wine-builds/ubuntu xenial inRelease'
sudo apt-add-repository --remove 'deb https://dl.winehq.org/wine-builds/ubuntu ./'
sudo apt-add-repository --remove 'https://dl.winehq.org/wine-builds/ubuntu ./'
sudo apt-add-repository --remove 'https://dl.winehq.org/wine-builds/ubuntu'

3 Answers 3

1

Remove the file containing a link to that repo from /etc/apt/sources.list.d or from /etc/apt.sources.list file.

0
0

this worked for me

sudo add-apt-repository --remove wine-builds
0

Navigate to /etc/apt/sources.list.d. There you'll see some files. You'll understand what those files are just by looking at them. Then open a terminal there by right-clicking. Then type sudo rm <filename>. Replace with the file you want to remove.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .