Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 609  / 1 Year ago, tue, november 22, 2022, 3:24:46

When I look in my /etc/apt/sources.list.d directory, I have the following files:


bazel.list
bazel.list.save
deadsnakes-ubuntu-ppa-focal.list
google-cloud-sdk.list
google-cloud-sdk.list.save

Whenever I run sudo apt update, I get a bunch of errors related to the Bazel and Google Cloud repos, e.g.


An error occurred during the signature verification. The repository is not updated and the
previous index files will be used. GPG error: https://packages.cloud.google.com/apt cloud-sdk
InRelease: The following signatures couldn't be verified because the public key is not available:
NO_PUBKEY xxx NO_PUBKEY xxx

Rather than trying to fix that error, I really just want to wipe out all custom Apt sources and PPAs - I am also having some issues with the deadsnakes PPA interfering with system Python.


My question: What steps do I need to take to completely remove custom Apt sources from my Ubuntu installation? Is it enough to just delete the files in the /etc/apt/sources.list.d directory? Should I also run sudo add-apt-repository --remove? Are there GPG or other keys stored somewhere that I need to purge?


I did see How can PPAs be removed?, which gives me a clue about how to remove the deadsnakes PPA, but I'm still not sure about the Google lists.


I'm running Ubuntu 20.04.5 LTS on WSL 2.


More From » apt

 Answers
6

From the terminal run:


sudo mv /etc/apt/sources.list.d/bazel.list /etc/apt/sources.list.d/bazel.list.old

sudo mv /etc/apt/sources.list.d/google-cloud-sdk.list /etc/apt/sources.list.d/google-cloud-sdk.list.old

This will disable each repository file. You can then edit them and rename them back if you should like to do so in the future.


[#156] Thursday, November 24, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eanda

Total Points: 439
Total Questions: 116
Total Answers: 105

Location: Armenia
Member since Sat, Dec 31, 2022
1 Year ago
eanda questions
Sat, Oct 16, 21, 23:48, 3 Years ago
Sun, Jul 3, 22, 09:38, 2 Years ago
Thu, Feb 3, 22, 14:33, 2 Years ago
;