Or copy link
Copy link
Encountering the error add-apt-repository command not found while attempting to manage software repositories on your Debian system can be expected. These solutions help you overcome this issue and effectively add new repositories to your system.
In this post, we will explore the common causes of the add-apt-repository command not found error and fix it by providing instructions for both simple and advanced users.
Before fix add-apt-repository command not found let’s understand what this error signifies. The add-apt-repository command is a tool used to add new software repositories to your Debian system. When you encounter the error “add-apt-repository command not found” it simply means that this command is not installed or accessible on your system.
The most common and simple way to resolve the sudo add-apt-repository command not found issue is by installing the software-properties-common package. This package contains the add-apt-repository command. Following are steps on how you can do it:
1. Press Ctrl+Alt+T to open a terminal window in the operating system or connect server via SSH to your Debian instance.
2. First we need to update the package list using the following command:
sudo apt update
This will update your Debian repository, If you want to upgrade the package also use the following:
sudo apt upgrade -y
3. Next, you need to install the software properties common package. Type the following command:
sudo apt install software-properties-common
4. After installing the package verify that with the following command:
add-apt-repository --help
If the command displays help information the installation was successful.
Access the Debian on Our SSH VPS!
Choose Ultahost managed SSH VPS hosting. Unlock a variety of performance scaling choices and enjoy total root access using SSH keys, granting you unmatched control.
If for some reason you cannot install the software-properties-common package, you can manually install the add-apt-repository command. However, this method is generally recommended for those users who understand technicalities. Following are the steps for manual installation:
1. You need to install the Python package with the help of the following command:
sudo apt install python3-software-properties
2. After that you have to create a symbolic link in Linux system. Type the following command:
sudo ln -s /usr/lib/python3*/dist-packages/softwareproperties/ppa.py /usr/bin/add-apt-repository
Replace /usr/lib/python3*/dist-packages with the actual path to your Python site-packages directory.
/usr/lib/python3*/dist-packages
3. Once you have successfully installed the add-apt-repository command you can use it to add new repositories to your system. For example To add a Wine repository:
sudo add-apt-repository "deb https://dl.winehq.org/wine-builds/debian $(lsb_release -cs) main"
Replace $(lsb_release -cs) with the correct code name for your Debian version.
Learn about How to Install Wine on Ubuntu 22.04.
After adding a new repository it is essential to update the package lists as described update command. If you no longer need a repository you can remove it using the ppa-purge command:
sudo ppa-purge ppa:<ppa_name>
While adding repositories can provide access to additional software it is important to use it carefully. Only add repositories from trusted sources to avoid security risks.
If you continue to encounter issues after trying the above solutions consider the following to resolve the Debian add-apt-repository command not found:
Following the steps outlined in this article you should be able to successfully resolve the “add-apt-repository command not found” error on your Debian system. Installing the software-properties-common package is generally the most straightforward solution for most users. For those who prefer a more manual approach the option to install the add-apt-repository command independently is also provided.
Start experimenting with different commands and packages on a Linux machine. When it comes to installing the machine try Ultahost CloudLinux VPS hosting in which you can get root or administrator access and with only a click you can upgrade your resources anytime. We offer a variety of VPS plans to choose from so you can find one that meets your needs.
This error occurs when the ‘add-apt-repository’ command is missing on your Debian system.
You get this error because the required package for the command is not installed on your system.
Install the ‘software-properties-common’ package using sudo apt install software-properties-common.
Yes, you need superuser privileges to install the required package.
No, installing the ‘software-properties-common’ package will not negatively affect your system.
WordPress is one of the most popular content management...
Security is the most important element in the website w...
When you need to restore a website it generally involve...
In the age of the internet, website data is your valuab...
Ubuntu Server is a powerful and flexible operating syst...
Kali Linux a security-focused distribution relies heavi...
Save my name, email, and website in this browser for the next time I comment.
Δ