The sudo: apt-add-repository: command not found error is one you might encounter when trying to add a third party PPA repository on Debian, Ubuntu, Linux Mint, or any other Linux distribution based on Debian.

PPA repositories are used for installing third party software not available in a system's official repositories. In this guide, we'll show you how to remedy this error so you can add these repositories and install the desired software.

In this tutorial you will learn:
  • How to fix apt-add-repository: command not found error
apt-add-repository: command not found error when trying to add a PPA respository
apt-add-repository: command not found error when trying to add a PPA respository
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Debian-based distro
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

Solution for apt-add-repository: command not found

If you're receiving this error, it means that your system is missing the package that allows it to add PPA repositories. The package you will need to install is called software-properties-common. Simply follow along with the steps below to get it installed on your system.

  1. Open a terminal and type the following command to fetch the latest repository updates.
    $ sudo apt update
    

  2. SUBSCRIBE TO NEWSLETTER
    Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


  3. Next, install the software-properties-common package.
    $ sudo apt install software-properties-common
    
  4. Finally, you can add any PPA repository you like. Just for an example, we'll add the one for Firefox and then use it to install the program.
    $ sudo apt-add-repository "deb http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu focal main"
    $ sudo apt update
    $ sudo apt install firefox
    

That's all there is to it. The PPA repository has been added, which allows us to install the software from it after we perform the apt update command.

Conclusion

In this guide, we saw how to resolve the sudo: apt-add-repository: command not found error on Debian-based systems. We also saw how to add a PPA repository and then install the desired software from it. Having the software-properties-common package on your system should allow you to add any future PPA repositories as needed.

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions