If you want to add a new PPA repository, you’ll have to use the add-apt-repository command in the following fashion:
sudo add-apt-repository ppa:some/ppa
In Debian, elementary OS and sometimes on Ubuntu, you’ll see the error that the add-apt-repository command is missing.
sudo: add-apt-repository: command not found
Let’s see how to fix this annoying 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 and you need to install this package in order to install add-apt-repository.
In a terminal use this command:
sudo apt-get install software-properties-common
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.
I hope this quick tip helped you fix the “add-apt-repository: command not found” error on Ubuntu and other Debian-based Linux distributions.