When trying to add a repository package or another repository link to their apt sources, many users receive the error message “add apt repository command not found”. Don’t worry. This post of MiniTool can help you fix it with 2 simple steps.

What Causes the “add-apt-repository: command not found” Error

One of the common ways to install software and applications Ubuntu and Debian distributions is to use the Personal Package Archive (PPA) repository package. With the add-repository package or software, you can easily add a PPA repository from your terminal without having to manually edit the apt sources and add repositories.

If you want to add a repository package or a PPA package from your terminal, you can run the add-apt-repository command (sudo add-apt-repository ppa: name/ppa). However, you could get the “add-apt-repository: command not found” error when the repository package is not installed or missing on your system.

How to fix the “sudo add apt repository command not found” error? Let’s keep reading the following steps.

Python Setup.py egg_info Failed with Error Code 1? [Fixed]
Python Setup.py egg_info Failed with Error Code 1? [Fixed]

Are you troubled by the command "python setup.py egg_info" failed with error code 1? Don’t worry. This post explores several effective fixes for you.

Read More

Fix the “add-apt-repository: command not found” Error with 2 Steps

As mentioned above, the main reason for the “add apt repository not found” error is the missing add-repository package. So, all the thing you need to do is to reinstall the package on your system. There are 2 simple steps for this installation guide.

Note: Before your start executing the steps below, make sure you log in to your user account with sudo privileges.

Step 1. Update your local repositories.

  1. Open a terminal window / command line by using the Ctrl + Alt + T or Ctrl + Alt + F2 key combinations.
  2. In the pop-up window, execute the sudo apt update command to update the local repositories. If you are in Ubuntu or Linux Mint system, you can try running the sudo apt update && sudo apt-upgrade

run sudo apt update in terminal

--image from linuxbabe

Step 2. Install the software-properties-common package.

The add-apt-repository command is not a regular package that can be installed with apt on Ubuntu or Debian system. It is a component of the software-properties-common package instead.

  1. In the terminal window, execute the sudo apt install software-properties-common This command will get the software-properties-common package installed.
  2. Update your local repositories again by running the sudo apt update

Now, the “add-apt-repository command not found” error should be fixed. You can add any PPA repository again by running the sudo add-apt-repository ppa: name/ppa command.

Extra Tip: How to Add Apt Repositories in Ubuntu & Debian

What can you do when the software packages aren’t included in the default repositories? In this case, you can run the add-apt-repository command to grant access to the software package that you want to install.

For instance, you want to install the Wine package on your Linux system, but it is non-Linux system software and the latest version is not available for the default repositories. To install the Wine package on your system, you can execute the sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’ command to grant access to Wine repositories.

How to Install Linux (Ubuntu) on Windows 10 [Ultimate Guide 2022]
How to Install Linux (Ubuntu) on Windows 10 [Ultimate Guide 2022]

Check out how to install Linux on Windows. Here are detailed steps to install Ubuntu along with Windows 10 and then dual boot Windows 10 and Linux.

Read More
  • Linkedin
  • Reddit