• Start Here
    • How to Install Linux
    • Which Distro To Choose
    • 10 Best Linux Distributions of 2023
  • Distros
    • Ubuntu
  • Linux Commands
  • Virtualization
  • Open Source
Linux Start
  • Start Here
    • How to Install Linux
    • Which Distro To Choose
    • 10 Best Linux Distributions of 2023
  • Distros
    • Ubuntu
  • Linux Commands
  • Virtualization
  • Open Source
Linux Start
Home»Distros»Ubuntu»How To Fix “Add-Apt-Repository Command Not Found” On Ubuntu

How To Fix “Add-Apt-Repository Command Not Found” On Ubuntu

Anup ThapaBy Anup ThapaMarch 30, 2023 Ubuntu 1 Min Read

Add-apt-repository is a python script that adds external repositories to your sources list (/etc/apt/sources.list or /etc/apt/sources.list.d/). If you encounter the command not found error when using this tool, there are two possibilities.

Either you made a typo when using the command. Or, the software-properties-common package, which this tool is a part of, is not present on your system. Both cases should be easy to solve.  

Fix Add-Apt-Repository Command Not Found

The software-properties-common package is used to manage software sources. For instance, it provides the add-apt-repository script which lets you easily add and remove PPAs.

Install Software-Properties-Common

Update your package index and install the latest version of software-properties-common with

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

If the package was already present, try reinstalling it instead.

sudo apt install --reinstall software-properties-common

Once that’s done, update your package index again.

sudo apt update

Test If Add-Apt-Repository Works

Finally, verify that the add-apt-repository command works now. We’ll add a PHP PPA to verify this in our case.

sudo add-apt-repository ppa:ondrej/php

It should be added successfully now. After adding the PPA, don’t forget to update the package index again before installing any packages.

Anup Thapa
  • LinkedIn

Anup Thapa is a Linux enthusiast with an extensive background in computer hardware and networking. At LinuxStart, Anup is an integral part of our editorial team. His goal is to effectively communicate technical concepts in a simplified form understandable by new Linux users. To this end, he mainly writes beginner-friendly tutorials and troubleshooting guides. Outside of work, he enjoys experimenting with different Linux distros and reading up on things like networking and virtualization.

Leave A Reply Cancel Reply

Table of Contents
  • Fix Add-Apt-Repository Command Not Found
    • Install Software-Properties-Common
    • Test If Add-Apt-Repository Works
Linux Start
Guides

What is the Linux Kernel?

The Linux Kernel is the core of the Linux operating system and is central to…

How To Install Linux Mint

How To Install Linux on VirtualBox

Getting Started with Linux

How to Install Linux

10 Best Linux Distros of 2023

Which Linux Distro Should You Choose? A Complete Guide to Help You Decide

© 2023 LinuxStart.com

Type above and press Enter to search. Press Esc to cancel.