APT's repository helper, add-apt-repository, is supplied by software-properties-common on Ubuntu and Debian 12. Installing that package resolves the missing command, while newer Debian releases need a repository-file workflow instead.
A sudo: add-apt-repository: command not found error means sudo cannot find the helper. The package also provides apt-add-repository as an alternate name for the same command. Installation requires an account with sudo privileges.
On Debian 13 (trixie), software-properties-common is unavailable from the distribution repositories; APT repository files are the supported path. Ubuntu PPAs are intended for Ubuntu, so installing the helper does not make a PPA compatible with Debian.
Steps to install add-apt-repository on Ubuntu or Debian 12:
- Update package information for APT.
$ sudo apt update
- Install software-properties-common using APT.
$ sudo apt install --assume-yes software-properties-common
The package and its dependencies come from your configured repositories. The --assume-yes option accepts the installation prompt automatically.
- Confirm that add-apt-repository displays its help.
$ add-apt-repository --help usage: add-apt-repository [-h] [-d] [-r] [-s] [-c COMPONENT] [-p POCKET] [-y] ##### snipped ##### options: -h, --help show this help message and exit ##### snipped #####
The help text confirms that the installed command can run. The --help option does not add a repository and does not require sudo.