In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to delete the repository and its GPG key in Ubuntu". In daily operation, I believe many people have doubts about how to delete the repository and its GPG key in Ubuntu. Xiaobian consulted all kinds of information and sorted out simple and easy to use operation methods. I hope to answer your doubts about "how to delete the repository and its GPG key in Ubuntu"! Next, please follow the small series to learn together!
Removing repositories in Ubuntu
Whenever a repository is added using the add-apt-repository command, it is saved in/etc/apt/sources.list.
To remove a software repository from Ubuntu and its derivatives, simply open the file/etc/apt/sources.list and look up the repository name and delete it.
$ sudo nano /etc/apt/sources.list
As you can see in the screenshot below, I added Oracle Virtualbox repository to my Ubuntu system.
virtualbox repository
To delete this repository, simply delete the entry. Save and close the file.
If you have added a PPA repository, check the/etc/apt/sources.list.d/directory and delete the entry.
Alternatively, you can delete the repository using add-apt-repository. For example, I want to delete the Systemback repository, as shown below.
$ sudo add-apt-repository -r ppa:nemh/systemback
Finally, update the software source list with the following command:
$ sudo apt update Delete repository key
We add the repository key using the apt-key command. First, let's list the keys added using the command:
$ sudo apt-key list
This command lists all added repository keys.
/etc/apt/trusted.gpg--------------------pub rsa1024 2010-10-31 [SC]3820 03C2 C8B7 B4AB 813E 915B 14E4 9429 73C6 2A1Buid [ unknown] Launchpad PPA for Kendek pub rsa4096 2016-04-22 [SC]B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECFuid [ unknown] Oracle Corporation (VirtualBox archive signing key) sub rsa4096 2016-04-22 [E] /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 1F32uid [ unknown] Ubuntu Archive Automatic Signing Key (2012) /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg------------------------------------------------------pub rsa4096 2012-05-11 [SC]8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg------------------------------------------------------pub rsa4096 2018-09-17 [SC]F6EC B376 2474 EDA9 D21B 7022 8719 20D1 991B C93Cuid [ unknown] Ubuntu Archive Automatic Signing Key (2018)
As you can see in the output above, that long (40 characters) string of hexadecimal values is the repository key. If you want APT package manager to stop trusting the key, simply delete it using the following command:
$ sudo apt-key del "3820 03C2 C8B7 B4AB 813E 915B 14E4 9429 73C6 2A1B"
Or, specify only the last 8 characters:
$ sudo apt-key del 73C62A1B
Done! Warehouse key has been deleted. Run the following command to update the repository list:
$ sudo apt update At this point, the study of "how to delete the repository and its GPG key in Ubuntu" is over, hoping to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.