(Fixed): 'Add-Apt-Repository Command Not Found' Error on Ubuntu/Debian

When you try to add a new software repository there are chances you face the “add-apt-repository command not found’ Ubuntu error, this article shows you how to FIX it for good. This is used to indicate that its package is missing from the system.

Follow through to learn how to resolve this issue on Ubuntu- and Debian-based Linux distributions.

Before you begin:

  1. I need a user account with Sudo privileges.
  2. Access to a terminal window or command line (Ctrl-Alt-T or Ctrl-Alt-F2).

What you need to know about Ubuntu Repositories

A software package is an application; in particular cases, one package needs another known as dependencies to run.

The package manager is used to do the loading software package work you want. Now if there are any dependencies then it installs those as well. Moreover, it keeps track of all the installed software and updates automatically.

It works in tandem with a software repository, a database of different software packages. Every Linux distribution gives access to a set of basic, default repositories by default.

In Ubuntu these are as follows:

  • Main – It is free and open-source software from the developers of Ubuntu.
  • Universe –It is free and open-source software from the Linux community.
  • Restricted –The device drivers and other software are under licensing from manufacturers.
  • Multiverse –All other software that is under copyright or legal restrictions.

In Debian, these are as follows:

  • Main – It is free licensed software.
  • Contrib –Free software that depends on non-free licensed software.
  • Non-free software has restrictions on use and distribution.

Now, if you want to install a software package, these are not included; for this, you need to add that to your package manager.

READ: The best Evernote Alternatives for Ubuntu and Debian.

2 Ways How to resolve add-apt-repository- Command not found an error

2 Ways How to resolve add-apt-repository- Command not found an error

Method #1: Update Local Ubuntu Repositories        

First, open the “terminal window” and enter the command to update repositories.

Sudo Apt Get Update command in Ubuntu

Sudo apt-get update

The system then confirms that this list on your local machine is updating.

READ: Ultimate Guide for Installing Chrome Browser in Ubuntu 20.04.

Method #2: Get the Package Software Properties Common Installed – Fix the ‘Unable to Locate’ issue

Unable to locate package software properties common

This command is not a regular package that can be installed using apt on Debian or Ubuntu LTS 18.04, 16.04, and 14.04. This is a component of this package.

To get rid of this command you need to install its package:

Sudo apt-get install software-properties-common

Following is an example of output after the installation has been successful

DekiSoft Fact: In Ubuntu version 13.10 and older, this command is part of the Python software package. To install this you need to use the following command:

Sudo apt-get install python-software-properties

READ: Recording your screen is now easy in Linux.

Adding an Apt repository in Ubuntu and Debian (Simple Way)

Keep in mind that certain software packages are not included in the default repositories. Developers have created their own to make the installation process easy. This is when this command is used.

For example; Wine is a known yet popular package for running non-Linux software on a Linux system, but the latest version is unavailable through default repositories.

To get its latest version; you need to first permit it:

sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’

The other subject might be subject to additional licensing. In the case of Debian, restrictive licensing might disqualify the package from getting included in these. In such cases, this command is a key to grant access to the software you wish to install.

READ: Debian or Ubuntu for Choice – Which should you go for?

Conclusion

In this, we have highlighted that your use can fix the add-apt-repository command not found on Ubuntu and Debian. Follow the steps accurately to get the desired results. If you find this article helpful or have any queries or suggestions, feel free to leave your comments in the section below.

Previous article4 Ways on How to Disable Microsoft Edge InPrivate Browsing
Next articleHow to Calibrate Monitor for Gaming/Photography in Windows 10/11
Lee White
Lee is currently a full-time writer at DekiSoft that is eager to discover new and exciting advancements in Technology, Software, Linux and Cyber Security. Lee has spent the past 18 years working as an Systems Engineer providing support for various operating systems and networks. When not at his desk or writing, you will find him tinkering with retro tech.

Leave A Reply

Please enter your comment!
Please enter your name here