Skip to content

[Linux] How to remove PPA that is no longer used


The Introduction

In Ubuntu operating system, most of the software is installed and managed by APT. However, if the software we need is not officially included, we usually use the PPA (Personal Package Archive) to install the software.

After we adding the PPA url to our computer, we can download the software uploaded by developer to Launchpad.net. So, you will often need to use the add-apt-repository command to add PPA.

The download way is convenient. But if the software we downloaded is no longer used or the link disappears, we usually use “apt update” to see a screen like the following:

It is a error message. It does not real harm to the computer, but if you don’t want to see it, you need remove the PPA that is not used.


To use “Software & Update” to remove

It’s a easy and intuitive way.


Remove via terminal

We always use the following command to add PPA:

sudo add-apt-repository "PPA_YOU_NEED"

If you want to remove it, just only add a argument “–remove“:

sudo add-apt-repository --remove "PPA_YOU_NEED"

But the problem is I often forget what the full name of the PPA I installed was. So we need to check the storage source list:

First, show the all of PPA we have:

sudo ls /etc/apt/sources.list.d

In my case, I have the following things:

embrosyn-ubuntu-cinnamon-bionic.list       
embrosyn-ubuntu-cinnamon-bionic.list.save  
leaeasy-ubuntu-dde-bionic.list
leaeasy-ubuntu-dde-bionic.list.save
gezakovacs-ubuntu-ppa-bionic.list       
google-chrome.list
google-chrome.list.save               
sublime-text.list
sublime-text.list.save

Suppose I want to remove “sublime”, I just need to key in:

sudo rm /etc/apt/sources.list.d/sublime-text.list

It will be done.


Use ppa-purge delete PPA and the software

Some ways of above just delete PPA. If you want to delete PPA and the software, you can use “ppa-purge” to do it.

First you need to install ppa-purge:

sudo apt-get install ppa-purge

And use the following command:

sudo ppa-purge "PPA_YOU_WANT_TO_REMOVE"

You can check your PPA url via Software application.

For example, if I want to delete nginx:

sudo ppa-purge http://ppa.launchpad.net/nginx/stable/ubuntu

References


Read More

Tags:

Leave a Reply