How to thoroughly Delete the PPA software library

Source: Internet
Author: User
Tags cairo gtk

Add a PPA Source

Sudo add-Apt-repository PPA: User/PPA-name

For example, add Cairo-dock to weekly update source.

Sudo add-Apt-repository PPA: Cairo-dock-team/weekly/Ubuntu

 

Delete

RM file

/Etc/APT/sources. List. d

 

Why delete a PPA software library?
1. This software has been included in the official repository for its outstanding features;
2. Because the software is no longer needed or lost to it;
3. Some PPA software libraries located abroad may slow down our upgrade process due to network issues.

General steps

To invalidate a PPA software library, you only need to use add-Apt-repository and the removed parameter-R (-Remove. However, this command is always unfriendly. Imagine what if we forget the name of a PPA software library?

The following uses the PPA of bazaar as an example to describe how to remove it. For the purpose of explanation and implementation, we should first add it to the system:


$ Sudo add-Apt-repository PPA: bzr/P
[Sudo] password for user:
You will add the following PPA to the system:
This archive contains the latest release or release candidate of bzr, bzr-GTK and bzrtools, built for all currently supported Ubuntu releases.


More information: https://launchpad.net /~ Bzr/+ archive/PPA
Press enter to continue or Ctrl + C to cancel adding

GPG: the key ring '/tmp/tmp_h2_5 P/secring. gpg' has been created.
GPG: the key ring '/tmp/tmp_h2_5 P/pubring. gpg' has been created.
GPG: Download the key '8c6c1efd' from the HKP server keyserver.ubuntu.com.
GPG:/tmp/tmp_h2_5 P/trustdb. GPG: Build a trust Database
GPG: Key 8c6c1efd: the Public Key "Launchpad PPA for bazaar developers" has been imported
GPG: no key absolutely trusted
GPG: Total number of processed items: 1
GPG: imported: 1 (RSA: 1)
OK

First, let's take a look at the complete command to be used to remove the software package name:

$ sudo add-apt-repository -r ppa:repository-name/subdirectory

After successful addition, let's assume that we do not know the name of the PPA software library. Let's take a look at how to get the contents in the format of PPA: repository-name/subdirectory. We can view the file in the/etc/APT/sources. List. d/directory of the PPA Repository:
$ Ls/etc/APT/sources. List. d
Bzr-ppa-raring.list

Let's take a look at the bzr-PPA-raring file. raring indicates the version code branch added to our current system. We cannot use this part. We will continue to look at the previous part of it, called PPA, which is equivalent to the subdirectory (subdirectory) section in the format of PPA: repository-name/subdirectory, then we can apply the PPA characters, and the package (name) is still missing. In addition to the directory, all the contents above belong to the PPA name. Here, the PPA name is bzr. Therefore, we need to execute the following command:

$ Ls/etc/APT/sources. List. d
Bzr-ppa-raring.list
[Email protected]: ~ $ Sudo add-Apt-repository-r PPA: bzr/PPA
[Sudo] password for user:
The following PPA will be deleted from the system:
This archive contains the latest release or release candidate of bzr, bzr-GTK and bzrtools, built for all currently supported Ubuntu releases.

More information: https://launchpad.net /~ Bzr/+ archive/PPA
Press [enter] to continue the operation. Press ctrl-C to cancel the deletion operation.

$

Note: If the name part contains multiple words, this form will appear.

maarten-baert-simplescreenrecorder-raring.list

In this case, we need to adopt the same method. All the sub-directory names except the sub-directory names belong to the names of the PPA software library. In this way, the DELETE command is:

$ sudo add-apt-repository -r ppa:maarten-baert/simplescreenrecorder

After deleting the PPA software library named bzr, we will find two residual parts in the system. First, the apt key ring corresponding to the PPA:

$ sudo apt-key list | grep -B 1 Bazaar
pub 1024R/8C6C1EFD 2009-01-19
uid Launchpad PPA for Bazaar Developers

The other is the two empty files in the/etc/APT/sources. List. d directory:

$ cd /etc/apt/sources.list.d/
[email protected]:/etc/apt/sources.list.d$ ls
bzr-ppa-raring.list bzr-ppa-raring.list.save
$ cat bzr-ppa-raring.list bzr-ppa-raring.list.save
$

We will clean up the residue below. From this command, we can know that the key ID of the bzr software library is 8c6c1efd. Through this keyid, we can delete it.

$ sudo apt-key del 8C6C1EFD
OK

You can use the RM command to delete the remaining two files.

$ sudo rm bzr-ppa-raring.list*

Simple Steps

Here, you may find that you can also clear the PPA software library in a simpler way, that is, you only need to delete/etc/sources. list. d/The corresponding file bzr-ppa-raring.list and APT key ring can be. Therefore, the preceding steps can be simplified:

$ sudo rm bzr-ppa-raring.list

$ sudo apt-key del 8C6C1EFD

The steps for deleting the PPA software library are all described here. The editor is about to get started. The command "Add-Apt-repository" created by Ubuntu to add the PPA software library can import the PPA and key ring, but cannot completely delete them. This is like a software installation program, but there is no uninstall program, it really makes me unable to wait for Jie Li patients!

How to thoroughly Delete the PPA software library

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.