How to use PPA in Ubuntu system? Complete guide to using PPA in Ubuntu Linux
If you are using Ubuntu, or other derivative versions such as Linux Mint, Linux Lite, or Zorin OS, you may encounter the added use of PPA. What is PPA? Why use PPA? How to properly add, use, and is PPA safe? Here is how to use PPA in Ubuntu systems.
What is PPA and why use it
PPA full name Personal Package Archive, as the name suggests is "personal package archive". Before you formally understand PPA, you should first understand the concept of "repository" in Linux:
Repository and package management concepts
A repository is a set of files that contain version information and details about various software, such as "checksums." Each Ubuntu release has its own 4 official "repositories" :
Main Canonical supported free and open source software Universe community maintained free and open source software Restricted devices proprietary driver Multiverse software limited by copyright and legality issues
You can click to view Repositories for all Ubuntu versions, or you can view dedicated repositories on the page, such as the Ubuntu 16.04 Main repository. Simply put, a "repository" is a Web URL that contains information about the software.
So how does the system know where the "repository" is located? This information is stored in the sources.list file in the /etc/apt directory. If you look at the text file, you can see the URL of the repository.
When you execute the sudo apt update command, the Ubuntu system uses the APT tool to check the online "repository" and store information about the software and its version in the cache. When you install the software with sudo apt install package_name, the system uses this information to get the package from the URL where the actual software is stored.
If there is no information about a package in the repository, the following error is returned in Terminal:
E: Unable to locate package
After introducing some basic information about the repository, we can begin to understand the PPA.
What is PPA
As you can see, Ubuntu's "repository" controls the versions of software that users can get on the system. But if an ISV or developer releases a new version of the software, Ubuntu's official "repository" is not immediately available. In order to ensure system stability, the official source will check whether the new version is compatible with the system, so after the release of the new version of the software, users will not be able to obtain the latest software version through the official "repository" of Ubuntu for a short time.
On the other hand, the official repository only provides "stable" software, and if an ISV wants to release a software version for beta testing, it cannot do so through the official source.
In the above situations, you need to use PPA.
How is PPA used and how does it work
PPA means personal package archiving, note the word "personal", which implies that this is something unique to the developer and is not officially endorsed by the distribution.
Ubuntu provides a platform called Launchpad that enables software developers to create their own repositories, making it easy for end users to add PPA repositories to sources.list. When the user updates the system, the Ubuntu system knows the availability of the new software and can install it using the standard sudo apt install package_name command, such as:
sudo add-apt-repository ppa:dr-akulavich/lighttable sudo apt-get update sudo apt-get install lighttable-installer
To summarize the above command:
- The sudo add-apt-repository
command adds the PPA repository to the sources.list list - sudo apt-get update This command updates the list of software packages
- The sudo apt-get install
command is used to install the software package
Now let's break it down in detail:
sudo add-apt-repository ppa:dr-akulavich/lighttable
The URL of the repository is not listed in the above command because the tool is designed to abstract information about the URL. If you add ppa:dr-akulavich/lighttable, the Light Table will be available. If you add ppa:dr-akulavich, you will be able to get all repositories or packages in the Upper Repository.
Basically, when you add A repository with add-apt-repository, you're doing something like this manually:
deb http://ppa.launchpad.net/dr-akulavich/lighttable/ubuntu YOUR_UBUNTU_VERSION_HERE main deb-src http://ppa.launchpad.net/dr-akulavich/lighttable/ubuntu YOUR_UBUNTU_VERSION_HERE main
The above two commands are the traditional way to add a repository to sources.list, and the configuration of the sources.list file is done automatically when a PPA is added without the user knowing the exact repository URL and operating system version, which is quite automated.
It is important to note that when using PPA it does not change the original sources.list configuration file in Ubuntu, but instead creates the list file and the corresponding backup file (save extension) in the /etc/apt.sources.list.d/ directory according to best practices.
This is a safety measure to ensure that PPA is added without contaminating the original sources.list, and it also AIDS PPA removal.
Official and unofficial PPA
You may also have heard of official PPAs and unofficial PPAs, what is the difference between the two?
When a software developer or developer creates a PPA for their software, it is called an official PPA. Sometimes, however, individuals create PPAs for other developers' projects. Why would anyone do that? Mainly because some developers only provide software source code, and for many ordinary users, source code compilation and installation in Linux is very painful, and through the unofficial PPA created by volunteers, users can easily install and manage the software.
Make sure your Linux distribution can use PPA
There are a few things to keep in mind when using PPA in Ubuntu or other Debian-based Linux distributions:
Not every PPA will work for your specific Linux version. You need to know which version of Ubuntu you are currently using, and the code name is very important. When you go to a PPA's web page, you can see which Ubuntu versions are supported by the PPA.
How to get the PPA web address? Simply search the Internet for PPA names, such as ppa:dr-akulavich/lighttable, to get results in Launchpad, the official PPA hosting platform. You can also search directly on the Launchpad website.
Why doesn't PPA work with all Ubuntu distributions
Ubuntu releases a new version every 6 months, and the PPA must be created for the specific version of the software to adapt, updating the PPA for each Ubuntu version is a tedious task, and maintaining software updates for older versions is not practical. So not all developers or PPA maintainers take the time to do this.
How do I install the application if the PPA does not work with your Linux version?
If the PPA does not work for your Ubuntu version, you can still download the DEB file to install the application. You can click on "View package details" :
You can then click on the package to display more details, and you can also find the source code and DEB files for the package here:
Since Gdebi is much better at handling dependencies, it is recommended to install these DEB files using Gdebi rather than Software Center.
How to remove PPA
It is recommended to delete the software installed through the PPA before deleting the PPA. If you only delete the PPA, the software already installed will remain on the system and will not get any updates yet.
So the question is, how do you tell which applications are installed via PPA?
Find the software installed via PPA
Ubuntu "Software Center" does not include this feature, we can use the "New Liode package Manager" to find out the software installed via PPA:
sudo apt install synaptic
Select "From" in "New Rider Package Manager" :
After you find the packages, you can delete them directly with the "New Lide Package Manager" or execute the "Terminal" command to delete them:
sudo apt remove package_name
After removing the packages installed with the PPA, you can proceed to remove the PPA from the sources.list.
Remove PPA graphically
Go to "Software and Updates" - then to the "Other Software" TAB - and find the PPA you want to remove:
You have two options: you deselect the PPA or use the "Delete" option directly.
The difference is that when you deselect a PPA entry, the ppa_name.list file in /etc/apt.sources.list.d is commented out; If the "Delete" option is selected, the ppaname.list file in the /etc/apt.sources.list.d directory is deleted directly.
Is it safe to use PPA
Due to the simple choice of software installation, PPA is very popular among Debian and Ubuntu user groups. As far as security is concerned, the official PPA can be used without consideration, while the use of unofficial PPA is entirely up to your personal choice.
As a rule of thumb, if the program requires sudo permissions, you should avoid installing the program through a third-party PPA.
Related article
-
Ubuntu22.04 How do I install Python 3.11? Ubuntu download and install Python graphic tutorial
Ubuntu22.04 system needs to use Python software, many friends do not know how to install, today I will share Python software download and installation of detailed tutorials2024-03-07 -
Before the computer installed Centos7 system, but in the startup process encountered a file exception, it can not open the machine, now want to use the USB disk installed Ubuntu system, how to install it? Please see the following graphic installation tutorial for details, very detailed for small white novice operation2024-02-29
-
How does Ubuntu access Windows files? How does Ubuntu access Windows folders
In the process of using Ubuntu Linux, sometimes we need to access the files or folders stored in the Windows system, how to do? See below for details2024-02-03 -
When decompressing files under Windows under Ubuntu, there will be garbled file names with Chinese file names extracted, this is most likely because buntu and Windows default encoding is different, of course, there are other reasons, please see below for details2024-01-09
-
How does Ubuntu check file size or folder size?
How does Ubuntu check file size or folder size? In Ubuntu, we can use commands to see the size of a given directory or file, as described below2023-12-22 -
How to set environment variables on Ubuntu? Three ways to set ubuntu environment variables
How to set environment variables on Ubuntu? Environment variables are used to set some parameters in the operating system, let's take a look at the three methods of setting ubuntu environment variables2023-12-22 -
ubuntu configures the static address method
This article mainly introduces the detailed explanation of ubuntu configuration static address method, friends in need can use for reference, I hope to be helpful, I wish you a lot of progress, early promotion and pay rise2023-12-15 -
How to install VMware Tools in Ubuntu? vmware tools installation details graphic tutorial
How to install VMware Tools in Ubuntu? Ubuntu wants to install VMware Tools, how to do it? Let's take a look at vmware tools installation details graphic tutorial2023-11-25 -
Failure to connect to the Ubuntu22.04 SSH installation server
This article mainly introduces the Ubuntu22.04 installation SSH can not connect the problem and the solution, this article gives you a very detailed introduction to everyone's study or work has a certain reference value, the need of friends can refer to2023-10-23 -
Ubuntu 23.10 will run the Firefox browser in native Wayland mode by default
Ubuntu 23.10 will run Firefox in native Wayland mode by default. In previous versions of Ubuntu, native Wayland mode in Firefox can also be enabled manually2023-09-19
Latest comments