5

So there are two PPA causing GPG warning during sudo apt update

W: GPG error: https://brave-browser-apt-release.s3.brave.com bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4FE13824E3FFC656
E: The repository 'https://brave-browser-apt-release.s3.brave.com bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://repository.spotify.com stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4773BD5E130D1D45
E: The repository 'http://repository.spotify.com stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I want to remove these PPA from my system how to do that at once?

grep -r 'repository.spotify.com ' /etc/apt

Ouput

/etc/apt/sources.list.d/spotify.list:deb http://repository.spotify.com stable non-free


grep -r 'brave-browser-apt-release.s3.brave.com' /etc/apt

Output

/etc/apt/sources.list.d/brave-browser-release-bionic.list:deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ bionic main
/etc/apt/sources.list.d/brave-browser-release-bionic.list.save:deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ bionic main
  • first cd /etc/apt and remove files mentioning brave or edit each and comment out lines in each file then to engage brave issue echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list – Scott Stensland Mar 16 '24 at 20:36

2 Answers2

11

Reinstall the programs, but remove corresponding files in /etc/apt/sources.list.d/. In case of Brave, see if there is any corresponding file with the command

ls /etc/apt/sources.list.d/brave-browser-*.list

before, remove it

sudo rm /etc/apt/sources.list.d/brave-browser-*.list

  • 1
    Ive just spent half an hour trying to run sudo apt-get update after removing and purging brave. I did https://askubuntu.com/q/1217043/638646 then I did https://askubuntu.com/q/23770/638646 and then https://community.brave.com/t/how-to-remove-brave-from-apt-get/143302 . EVERY TIME the link would re appear when running apt-get update. Until I found your answer. Thank you. I even ran the dpkg -S brave thing multiple times and it found nothing. SO MUCH GOOGLING. It just kept reappearing in the apt-get list of URLs. This was the answer. Thanks you – Chuck Jun 23 '23 at 23:09
1

You can edit the (PPA) repo file directly, and delete the entry(s) that you want to remove:

sudo nano /etc/apt/sources.list

Or use the add-apt-repository command, with the -r switch to remove:

sudo add-apt-repository -r ppa:<repo name>

"repo name" - The apt repository source line to add. This is one of:

  1. a complete apt line in quotes,
  2. a repo url and areas in quotes (areas defaults to 'main'),
  3. a PPA shortcut,
  4. a distro component.

Examples:

apt-add-repository 'deb http://myserver/path/to/repo stable myrepo'
apt-add-repository 'http://myserver/path/to/repo myrepo'
apt-add-repository 'https://packages.medibuntu.org free non-free'
apt-add-repository http://extras.ubuntu.com/ubuntu
apt-add-repository ppa:user/repository
apt-add-repository multiverse

Then update the repo lists:

sudo apt update

To delete corresponding repo keys (although yours are missing, so not required):

:> sudo apt-key list # To list all the keys
/etc/apt/trusted.gpg.d/ubuntu-repo-archive.gpg
------------------------------------------------------
pub rsa4096 2018-01-01 [SC]
F6EC B376 2474 EDA9 D21B 7022 8719 20D1 991B C93C
uid [ unknown] Ubuntu Archive Automatic Signing Key
:> sudo apt-key del "991BC93C"    # Specify the key with full code, or just last 8 bytes
:> sudo apt update                # Update repos
sarlacii
  • 529
  • From add-apt-repository --help, any of the following can be used: apt-add-repository 'deb http://myserver/path/to/repo stable myrepo' apt-add-repository 'http://myserver/path/to/repo myrepo' apt-add-repository 'https://packages.medibuntu.org free non-free' apt-add-repository http://extras.ubuntu.com/ubuntu apt-add-repository ppa:user/repository apt-add-repository multiverse – sarlacii Oct 09 '19 at 09:44