Add-apt-repository command not found error- Solved Ubuntu/Kali

If you have just installed Ubuntu, Debian, Kali or other similar Linux operating system those are using the apt package manager to add a repository, then this solution is for you.

Many times when we want to use command add-apt-repository to add some software PPA repository on our Ubuntu or Debian systems, we could get an error “command not found”.

This error appears because the Debian based Linux system you are using doesn’t have the supported software packages that the add-apt-repository command needs. Thus, before using it to add any repo, we have to install common software properties for it,

Solve Add-apt-repository command not found

For all latest Ubuntu & Debian Linux systems such as Ubuntu 19.10/19.04, 18.10/18.04, 17.04, 16.04; Kali Linux; Linux Mint and Debian use the below command:

sudo apt-get install software-properties-common

Output for the above command: Press Y to continue the installation of the packages.

[email protected]:~# sudo apt-get install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libpython3.6-minimal libpython3.6-stdlib live-boot-doc python3.6
python3.6-minimal
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
apt apt-utils gcc-9-base gir1.2-packagekitglib-1.0 libappstream4
libapt-inst2.0 libapt-pkg5.0 libglib2.0-0 libglib2.0-bin libgnutls30
libhogweed5 libnettle7 libp11-kit0 libpackagekit-glib2-18 libpython3-stdlib
libpython3.7-minimal libpython3.7-stdlib libreadline8 libssl1.1 libstdc++6
libstemmer0d libtasn1-6 libyaml-0-2 p11-kit-modules packagekit
packagekit-tools python3 python3-dbus python3-distro-info python3-minimal
python3-software-properties python3.7 python3.7-minimal unattended-upgrades
Suggested packages:
apt-doc aptitude | synaptic | wajig dpkg-dev gnutls-bin appstream
python3-doc python3-tk python3-venv python-dbus-doc python3-dbus-dbg
python3.7-venv python3.7-doc binutils binfmt-support bsd-mailx default-mta
| mail-transport-agent needrestart
The following NEW packages will be installed:
gcc-9-base gir1.2-packagekitglib-1.0 libappstream4 libhogweed5 libnettle7
libpackagekit-glib2-18 libpython3.7-minimal libpython3.7-stdlib libreadline8
libstemmer0d libyaml-0-2 packagekit packagekit-tools python3-dbus
python3-distro-info python3-software-properties python3.7 python3.7-minimal
software-properties-common unattended-upgrades
The following packages will be upgraded:
apt apt-utils libapt-inst2.0 libapt-pkg5.0 libglib2.0-0 libglib2.0-bin
libgnutls30 libp11-kit0 libpython3-stdlib libssl1.1 libstdc++6 libtasn1-6
p11-kit-modules python3 python3-minimal
15 upgraded, 20 newly installed, 0 to remove and 724 not upgraded.
Need to get 15.0 MB of archives.
After this operation, 29.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]

For older Ubuntu and Debian versions use this command:

sudo apt-get install python-software-properties

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.