How to Fix add-apt-repository Command Not Found?

How to Fix add apt repository Command Not Found

Debian is a popular and free Linux-based operating system commonly used in computers and servers. In Debian-based distributions, Advance Package Tool (apt) is the default package manager. Using the apt package manager, the software can be installed and removed from the system. Apart from this, the apt package manager allows you to add the repositories of specific packages to your Debian system.

While adding repositories utilizing the add-apt-repository command, an error “add-apt-repository command not found” may be invoked. This post will also demonstrate the reasons for the error “add-apt-repository Command Not Found on Debian” and provide the solutions.

How to Fix the “add-apt-repository command not found” Error?

In this section, the reason for the add-apt-repository Command Not Found on Debian” error and its solution will be discussed.

Cause: apt-add-repository Command is Not Installed

We will try to install the “ansible” PPA repository if the error “apt-add-repository” appears and will remove it by installing the missing “Software-Common-Properties” package:

$ sudo apt-add-repository ppa:ansible/ansible

add-apt-repository command not found Error

The output shows the error apt-add-repository: command not found“.

Solution: Install Software-Common-Properties Package

As apt-add-repository is part of the software common properties package.

Step 1: Update the Default Repository

Before installing a package, we must update the already installed packages in the default repository using the below-mentioned command:

$ sudo apt update

Update the packages in default repository

Step 2: Install the Missing Package

The error “add-apt-repository command not found” can be removed by installing the missing software-properties-common package. To install apt-add-repository, use the following command:

$ sudo apt install software-properties-common

Install the missing software-common-properties package

The error-free output shows that the package is successfully installed.

Step 3: Verify the add-apt-repository command Error is Fixed

After updating the system, let’s try to add Ansible’s ppa repository again:

$ sudo apt-add-repository ppa:ansible/ansible

Verify that error is removed

The error-free output shows that theansible” PPA repository is successfully installed.


To remove the “add-apt-repository command not found” error on Debian, install the software-properties-common package using the “sudo apt install software-properties-common” command. This article has demonstrated why the error “add-apt-repository command not found” invokes and provided the relevant solution to fix it.

Leave a Reply

Your email address will not be published. Required fields are marked *