Fix “sudo add-apt-repository command not found” on Ubuntu 20.04

Ubuntu 22.04 is shipped with a lot of utility packages. While many VPS providers use a minimal template, and remove some of them. The command ‘add-apt-repository‘ might be not available. When calling,

sudo apt-add-repository ppa:zanchey/asciinema

, you may get an error shown as below:

sudo: apt-add-repository: command not found

To make it work, you can simplely execute the following command:

sudo apt update && apt install -y software-properties-common 

If everything goes well, apt-add-repository should be successfully installed with extra 24.1 MB disk space, and you can check that by running the command below:

which apt-add-repository

And you should get the response:

Nailed done! apt-add-repository is now ready for use.

Leave a Reply

Your email address will not be published. Required fields are marked *