How to Resolve add-apt-repository: command not found Error on Ubuntu Linux

This brief tutorial shows students and new users how to quickly and easily fix the sudo: add-apt-repository: command not found error when using Ubuntu 18.04 | 16.04.

Most Ubuntu users tend to install Ubuntu minimal server version. With Ubuntu minimal version, you get a limited set of tools and packages just enough to operate the server in most environments.

Because of the limited tools available, you may run into situations where some needed tools are not installed out of the box.

For example, if you want to add a new PPA repository, you’ll have to use the¬†add-apt-repository command. But with Ubuntu server minimal version, the command is not installed by default. You’ll need to install it before using it.

Resolve add-apt-repository: command not found

Fixing the add-apt-repository: command not found an error in Ubuntu is simple. The add-apt-repository command depends on software-properties-common and it doesn’t come installed.

Simply run the commands below to install software-properties-common.

sudo apt update
sudo apt install software-properties-common

Then update Ubuntu and try to add a PPA repository using the add-apt-repository.

sudo apt update

Now you can add your PPA as shown below:

Example:

sudo add-apt-repository ppa:nginx/development

That’s it!

Conclusion:

This post shows you how to quickly and easily resolve the add-apt-repository: command not found error on Ubuntu 18.04 | 16.04 systems. If you find any error above, please use the form below to report it.

Thanks,

You may also like the post below: