• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
WebSetNet

WebSetNet

Technology News

  • Technology News
    • Mobile
    • Games
  • Internet Marketing
  • System Admin
    • Windows
    • Linux
    • Mac & Apple
    • Website Scripts
      • Wordpress

What is PPA Purge? How to Use it in Ubuntu and other Debian-based Distributions?

March 25, 2021 by bartez64

PPA is a popular method of installing additional applications or newer versions of a software in Ubuntu.

I have written a detailed guide on PPA so I will just quickly recall it here. PPA is a mechanism developed by Ubuntu to enable developers to provide their own repositories. When you add a PPA, you add additional repository to your system and thus you can download applications from this additional repository.

sudo add-apt-repository ppa:ppa-address
sudo apt update
sudo apt install package_from_ppa

I have also written about deleting PPAs from your system. I briefly mentioned the PPA Purge tool in that article. In this tutorial, you’ll get more detailed information about this handy utility.

What is PPA Purge?

PPA Purge is a command line tool that disables a PPA repository from your software sources list. Apart from that, it reverts the system back to official Ubuntu packages. This is a different behavior than simply deleting the PPA repository.

Suppose application ABC has version x available from Ubuntu repositories. You add a PPA that provides a higher version y of the same application/package ABC. When your Linux system finds that the same package is available from multiple sources, it uses the source that provides a newer version.

In this example, you’ll have version y of application ABC installed thanks to the PPA you added.

Normally, you would remove the application and then remove the PPA from sources list. But if you use ppa-purge to disable the said PPA, your application ABC will automatically revert to the older version x provided by Ubuntu repositories.

Do you see the difference? Probably not. Let me explain it to you with real examples.

Reverting applications to the official version provided by Ubuntu

I heard that the upcoming VLC 4.0 version has major UI overhaul. I wanted to try it before it is officially released and so I used the daily build PPA of VLC to get the under-development version 4.

Take a look at the screenshot below. I have added the VLC PPA (videolan/master-daily) and this PPA provides VLC version 4.0 release candidate (RC) version. Ubuntu repositories provide VLC version 3.0.11.

vlc ppa

If I use the ppa-purge command with the VLC daily build PPA, it disables the PPA and reverts the installed VLC version to 3.0.11 which is available from Ubuntu’s universal repository.

using ppa purge

You can see that it informs you that some packages are going to be downgraded.

downgrade packages with ppa purge

When the daily build VLC PPA is purged, the installed version reverts to what Ubuntu provides from its official repositories.

package reverted ppa purge

You might think that VLC was downgraded because it was upgraded from version 3.0.11 to VLC 4.0 with the PPA. But here is a funny thing. Even if I had used the PPA to install VLC 4.0 RC version afresh (instead of upgrading it), it would still be downgraded instead of being removed from the system.

Does it mean ppa-purge command cannot remove applications along with disabling the PPA? Not quite so. Let me show another example.

PPA Purge impact on application only available from a PPA

I recently stumbled across Plots, a nifty tool for plotting mathematical graphs. Since it is a new application, it is not available in Ubuntu repositories yet. I used its PPA to install it.

If I use ppa-purge command on this PPA, it disables the PPA first and then looks to revert it to the original version. But there is no ‘original version’ in Ubuntu’s repositories. So, it proceeds to uninstall the application from Ubuntu.

The entire process is depicted in the single picture below. Pointer 1 is for adding PPA, pointer 2 is for installing the application named plots. I have discarded the input for these two commands with redirection in Linux.

You can see that when PPA Purge is used (pointer 3), it disables the PPA (pointer 4) and then proceeds to inform that the application plots will be removed (pointer 5).

ppa purge deleting apps

Deleting a PPA vs disabling it

I have repeatedly used the term ‘disabling PPA’ with PPA Purge. There is a difference between disabling PPA and deleting it.

When you add a PPA, it adds a new file in the /etc/apt/sources.list.d directory. This file has the URL of the repository.

Disabling the PPA keeps this file but it is commented out the repository in the PPA’s file. Now this repository is not considered while updating or installing software.

disabled ppa

You can see disabled PPA repository in Software & Updates tool:

disabled ppa ubuntu

When you delete a PPA, it means deleting the PPA’s file from etc/apt/sources.list.d directory. You won’t see it anywhere on the system.

ppa deleted
PPA deleted

Why disable a PPA instead of deleting it? Because it is easier to re-enable it. You can do just check the box in Software & Updates tool or edit the PPA file and remove the leading # to uncomment the repository.

Recap of what PPA Purge does

If it was too much information, let me summarize the main points of what the ppa-purge script/tool does:

  • PPA Purge disables a given PPA but doesn’t delete it.
  • If there was a new application (which is not available from any sources other than only the PPA) installed with the given PPA, it is uninstalled.
  • If the PPA upgraded an already installed application, that application will be reverted to the version provided by the official Ubuntu repositories.
  • If you used the PPA to install (not upgrade) a newer version of an application (which is also available from the official Ubuntu repository), using PPA Purge will downgrade the application version to the one available from Ubuntu repositories.

Using PPA Purge

Alright! Enough explanation. You might be wondering how to use PPA Purge.

You need to install ppa-purge tool first. Ensure that you have universe repository enabled already.

sudo apt install ppa-purge

As far using PPA Purge, you should provide the PPA name in a format similar to what you use for adding it:

sudo ppa-purge ppa:ppa-name

Here’s a real example:

ppa purge example

If you are not sure of the PPA name, use the apt show command to display the source repository of the package in question.

apt show vlc
apt show find ppa source
Finding PPA source URL

For example, the source for VLC PPA shows http://ppa.launchpad.net/videolan/master-daily/ubuntu groovy/main. Out of this the terms after ppa.launchpad.net and before Ubuntu are part of PPA name. So here, you get the PPA name as videolan/master-daily.

If you have to use to purge the PPA ‘videolan/master-daily’, you use it like this by adding ppa: before PPA name:

sudo ppa-purge ppa:videolan/master-daily

Do you purge your PPAs?

I wanted to keep this article short and crisp but it seems I went in a little bit of more detail.As long as you learn something new, you won’t mind the additional details, will you?

PPA Purge is a nifty utility that allows you to test newer or beta versions of applications and then easily revert to the original version provided by the distribution. If a PPA has more than one application, it works on all of them.

Of course, you can do all these stuff manually which is to disable the PPA, remove the application and install it again to get the version provided by the distribution. PPA Purge makes the job easier.

Do you use ppa-purge already or will you start using it from now onwards? Did I miss some crucial information or do you still have some doubts on this topic? Please feel free to use the comment sections.

Original Article

Related posts:

  1. List of PPA Repositories for Ubuntu 17.04 Zesty Zapus
  2. Using PPA in Ubuntu Linux [Complete Guide]
  3. Things to do After Installing Ubuntu 18.04
  4. The 5 Coolest Things About VLC 3.0
  5. Beginner’s Guide to Handle Various Update Related Errors in Ubuntu
  6. Installing Packages From External Repositories in Ubuntu [Explained]
  7. Ubuntu 17.04 "Zesty Zapus" All Flavors Download Links
  8. Download Icons For Ubuntu – 10 Best Icons Themes For Ubuntu
  9. Best Ubuntu Themes: 10 Linux Icon Themes 2019
  10. Fixing “Target Packages is configured multiple times” Error in Ubuntu & Debian Based Linux Distributions

Filed Under: Linux

Primary Sidebar

Trending

  • How to fix Windows Update Error 80244019
  • Windows 10 Update keeps failing with error 0x8007001f – 0x20006
  • How To Change Netflix Download Location In Windows 10
  • Troubleshoot Outlook “Not implemented” Unable to Send Email Error
  • How do I enable or disable Alt Gr key on Windows 10 keyboard
  • How To Install Android App APK on Samsung Tizen OS Device
  • 3 Ways To Open PST File Without Office Outlook In Windows 10
  • FIX: Windows Update error 0x800f0986
  • How to Retrieve Deleted Messages on Snapchat
  • Latest Samsung Galaxy Note 20 leak is a spec dump revealing key features
  • Install Android 7.0 Nougat ROM on Galaxy Core 2 SM-G355H
  • 192.168.1.1 Login, Admin Page, Username, Password | Wireless Router Settings
  • Websites to Watch Movies Online – 10+ Best Websites Without SignUp/Downloading
  • How to Backup SMS Messages on Your Android Smartphone
  • How to delete a blank page at the end of a Microsoft Word document
  • Fix: The Disc Image File Is Corrupted Error In Windows 10
  • Android 11 Custom ROM List – Unofficially Update Your Android Phone!
  • Samsung Galaxy Z Fold 3 could be scheduled for June 2021, with S Pen support

Footer

Tags

Amazon amazon prime amazon prime video Apple Application software epic games Galaxy Note 20 Galaxy S22 Plus Galaxy S22 Ultra Google Sheets headphones Huawei icloud Instagram instant gaming ip address iPhone iphone 12 iphone 13 iphone 13 pro max macOS Microsoft Microsoft Edge Mobile app office 365 outlook Pixel 6 Samsung Galaxy Samsung Galaxy Book 2 Pro 360 Samsung Galaxy Tab S8 Smartphone speedtest speed test teams tiktok Twitter vpn WhatsApp whatsapp web Windows 10 Windows 11 Changes Windows 11 Release Windows 11 Update Windows Subsystem For Android Windows 11 Xiaomi

Archives

  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org