How to Remove and Disable an Individual PPA in Ubuntu 22.04

Well, after adding a couple of PPA to your Ubuntu system, some of the PPA are deprecated because the developer or community member is not maintaining the repo anymore.

And hence, you may get an error while updating the repository. To resolve this, you can either temporarily disable the particular PPA from your system, or else remove the PPA from the system, which will delete the application source address from /etc/apt/source.d.

There are two methods through which you can disable the particular PPA on the system.

Command line way to disable and remove PPA in Ubuntu

In three simple steps, you will be able to disable PPA from your Ubuntu system, and later, you will also learn how to remove any additional PPA from Ubuntu in the following subsection.

Disable Specific PPA in Ubuntu 22.04

You can remove the specific PPA from your system when you know where it is stored and how to manage it. Therefore, first we will see how to disable PPA on a temporary basis on your Ubuntu-based machines, and later on, we will show how to remove the added PPA.

Step: 1 Find the PPA information

You can find the PPA information while running the apt update command or else by going to /etc/apt/sources.list.d/ to find the PPA information.

The best option I would suggest you run sudo apt update, which will list out all the PPA that you have added to your system. Along with that, you will also get to know which PPA is throwing an error while updating the repository.

On my part, I have tried to update the repository and found that a couple of PPA are not working anymore, and because of that, the output looks messy, which you can clearly see in the below-attached image of my terminal window.

PPA's error information
PPA’s error information

Step:2 Modify particular PPA content

From the above output, I have selected the “https://ppa.launchpadcontent.net/irie/blender/ubuntu”, which is on the fourth line of the above attached image.

And once you know which PPA you want to disable, go to the etc/apt/sources.list.d/ directory where you will find all the third party PPAs that have been added by you.

$ cd /etc/apt/sources.list.d/
$ ls

The output of the above command:

[email protected]:/etc/apt/sources.list.d$ ls
irie-ubuntu-blender-jammy.list  n-muench-ubuntu-vlc-jammy.list

According to the above output result, I do have two PPA information, and from that I have selected the irie-ubuntu-blender-jammy.list, which I’ll open for you using the nano command line editor with sudo privilege to modify the file

$ sudo nano irie-ubuntu-blender-jammy.list

Once you open the respective file, you will find a similar kind of output as shown in the below image. As you can see, the second line of information is commented out and, for this reason, it will not show up while updating the repo.

Before appending "#" to disable PPA
Before appending “#” to disable PPA

The same thing we will do with the uncommented line of information, so take your cursor to the start of the first line and append the “#” at the beginning of “deb” as explained in the below image.

Disabling PPA by appending “#”

Once you have added the “#”, save the file by pressing Ctrl-O.

Step:3 Update system to verify changes

After following the above steps, let’s update the repository to see the changes by executing the below command in your terminal window.

$ sudo apt update

As a result, you will find the apt update command is not printing the disabled PPA information during updating the repository, which was the main objective of this current section.

Remove specific PPA from Ubuntu based distrbutions

Well, I know you are aware of where the PPA is located in Ubuntu and other Ubuntu-based distros because you have followed the above steps where you learned how to disable the PPA.

Instead of disabling PPA, you can remove particular or multiple PPA from your system by using the rm command, which will delete the respective file from your system, which permanently suppresses the error of the deprecated PPA information.

Let’s say I want to remove the “https://ppa.launchpadcontent.net/irie/blender/ubuntu” from the system, which is located in the /etc/apt/sources.list.d/ directory.

To know the exact filename of the respective PPA, let me first get into the directory by executing the following commands in the given sequence.

$ cd /etc/apt/sources.list.d/
$ ls

The output of the above command

[email protected]:/etc/apt/sources.list.d$ ls
irie-ubuntu-blender-jammy.list  n-muench-ubuntu-vlc-jammy.list

The final command you need to run after getting aware of the respective PPA filename is like the below snippet.

$ sudo rm irie-ubuntu-blender-jammy.list

And hence, you can update the repository to see the changes.

Those who don’t want to manually edit or remove the PPA information to avoid any unwanted changes can use the “Software & Updates” application to disable and remove the PPA, which we will see in the next section.

Graphical way to disable and remove PPA in Ubuntu

Alternatively, you can use “Software & Updates” to disable and remove PPA from your Ubuntu system by following the simple steps that I have described below.

Use the Software and Updates application to disable the PPA from Ubuntu

Step 01: First of all, press the super key or take your mouse to activities and search for “Software & Updates”, which will be the first thing to open as shown in the below image.

Software-and-Update-Application
Software and Update Application

Step 02: Change the tab to “Other Software” and uncheck the PPA, which you want to disable. As you uncheck, it will prompt you to enter a sudo password to authenticate the process.

Once the password is validated, you will find the output of the “Software and Update” as shown in the below image.

Uncheck the following PPA
Uncheck the following PPA

Quite simple, right?

Use the Software and Updates application to remove the PPA from Ubuntu

You may also remove the PPA from your system by using the same software, just like how we disabled the PPA in the above section. Open the “Software and Update” application and change the tab to “Other Software”.

As you can see, I have selected the third PPA, which is “https://ppa.launchpadcontent.net/n-muench/vlc/ubuntu”. Once you select the PPA, the “Remove button” will become enabled to use, so simply click on it, which will ask for your sudo password to authenticate the process.

Remove PPA from system
Remove PPA from system

After that, you will get your result.

Wrap up

That’s all for now where you have learned how to disable and remove PPA on your Ubuntu based system. I have tested this guide on Ubuntu 22.04, so I believe this guide will work on all Ubuntu based distributions like POP!_OS, Linux Mint, etc without any hassle.

If anything needs to be corrected or if you have any suggestions, then do let us know in the comment section.

Leave a Reply