How To Delete A Repository And GPG Key In Ubuntu

How To Delete A Repository And GPG Key In Ubuntu

Tutorial To Delete A Repository And GPG Key In Ubuntu

In this tutorial, we will show you the process to delete  a repository along with its GPG key in Ubuntu and on other Linux operating system  like Elementary OS, PopOS and Linux Mint

How To Delete A Repository And GPG Key In Ubuntu

There are two way to install software on Linux. One of the way is through the software center and another way is to via command line by adding Repository and GPG key in Ubuntu. There are 4 official repositories and they are Main, Universe, Restricted and Multiverse. There are also unofficial repositories available in the internet. The unofficial repositories are those packages which are not available in the official repositories.

Delete A Repository In Ubuntu

Repository using add-apt-repository command are stored in /etc/apt/sources.list file. Run the following command to delete a software repository from Ubuntu and its derivatives.

sudo nano /etc/apt/sources.list

You can easily delete the repository by removing the entry. Save and close the file.

In another method, run the following command to delete the repository using add-apt-repository command.

sudo add-apt-repository -r [ppa:name]

Finally, run the following command to update the software sources list.

sudo apt update

Delete Repository keys in Ubuntu

Run the following command to list out the apt-key in Ubuntu.

sudo apt-key list

This above command will list all added repository keys.

READ More Relevant Stuff:  How To Install VMware Workstation 17 Player On Linux Mint 21

Run the following command to delete the key.

sudo apt-key del "5820 915B C8B7 813E 03C2 B4AB  73C6 14E4 2A1B  9429"

At last, Run the following command to update the repository lists:

 

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

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