> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Fix 'add-apt-repository command not found' Error on Ubuntu and Debian
- URL: https://itsfoss.com/add-apt-repository-command-not-found/
- Published: 2018-10-08T16:15:34.000Z
- Updated: 2024-01-02T04:40:10.000Z
- Description: Here's how to quickly fix the "add-apt-repository command not found" error on Debian, Ubuntu and other Debian-based Linux distributions.
- Author: Abhishek Prakash
- Tags: Troubleshoot 🔬

One of the many ways to install software on [Ubuntu](https://www.ubuntu.com/?ref=itsfoss.com) or [Debian](https://www.debian.org/?ref=itsfoss.com) is to [use a PPA](https://itsfoss.com/ppa-guide/) ([Personal Package Archive](https://launchpad.net/ubuntu/+ppas?ref=itsfoss.com)) or an external APT repository.

If you want to add a new APT repository, you have the option to use the add-apt-repository command in the following fashion:

```
sudo add-apt-repository ppa:some/ppa
```

Or, in this fashion:

```
add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
```

That's what you'll often see in various tutorials and installation documentations.

This `add-apt-repository` is a script that adds external APT repositories and it comes pre-installed on Ubuntu, Debian and their derivatives.

Well, they do mostly, but in some cases, it might not be installed. And when you try running the command, you'll see this error.

**sudo: add-apt-repository: command not found**

Let’s see how to fix this annoying error.

## Fix add-apt-repository: command not found error

The error is simple. The package add-apt-repository is not installed on your system.

But if you try to use `sudo apt-get install add-apt-repository`, it won’t work.

It’s because the add-apt-repository command is part of [package software-properties-common](https://packages.debian.org/sid/admin/software-properties-common?ref=itsfoss.com) and you need to install this package in order to install add-apt-repository.

So open a terminal and use this command:

```
sudo apt-get install software-properties-common
```

The command’s output will be something like this:

```
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  software-properties-common
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,912 B of archives.
After this operation, 197 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 software-properties-common all 0.96.24.32.5 [9,912 B]
Fetched 9,912 B in 2s (5,685 B/s)                      
Selecting previously unselected package software-properties-common.
(Reading database ... 265950 files and directories currently installed.)
Preparing to unpack .../software-properties-common_0.96.24.32.5_all.deb ...
Unpacking software-properties-common (0.96.24.32.5) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...
Setting up software-properties-common (0.96.24.32.5) ...
```

Once you’ve installed software-properties-common, you should update the system using this command:

```
sudo apt-get update
```

You can now comfortably use add-apt-repository or apt-add-repository commands to add PPAs.

📋

If you see an error saying software-properties-common command not found, you should run sudo apt-get update and then try to install it again.

## More on repositories

I hope this quick tip helped you fix the “add-apt-repository: command not found” error on Ubuntu and other Debian-based Linux distributions.

If you’re still facing issues with PPAs, this detailed tutorial will help you.

[Understanding PPA in Ubuntu Linux \[Ultimate Guide\]An in-depth article that covers almost all the questions around using PPA in Ubuntu and other Linux distributions.![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/2023/05/Understanding-ppa-in-ubuntu.png)](https://itsfoss.com/ppa-guide/)

I highly recommend going through this in-depth series of tutorials to understand how the repository mechanism works.

[Understanding Ubuntu’s Repository System \[Beginner’s Guide\]Learn the underlying mechanism of the repository system in Ubuntu to better handle the package management and avoid common update errors.![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/2023/07/ubuntu-repository-system.png)](https://itsfoss.com/ubuntu-repository-mechanism/)

Additional suggestions, questions or a quick word of thanks are always welcome.