• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

apt-add-repository: command not found

by admin

apt-add-repository is a command-line tool that is used to add a new package repository to the list of repositories available to the apt package manager. It is included in the software-properties-common package, which is installed by default on many popular Linux distributions such as Ubuntu and Debian.

To use apt-add-repository, you need to provide it with the repository’s location, which is typically specified as a URL. For example, to add the repository for the Google Chrome browser, you can use the following command:

# sudo apt-add-repository "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"

This will add the specified repository to the list of available repositories, allowing you to install packages from that repository using the apt package manager.

Note that apt-add-repository is primarily used to add third-party repositories to a system. Most Linux distributions come with a set of default repositories that are configured by default, and you can install packages from these repositories using the apt package manager without the need to add any additional repositories.

If you encounter the below error while running the apt-add-repository command:

apt-add-repository: command not found

you may try installing the below package:

# apt-get install software-properties-common

apt-add-repository Command Examples

1. Add a new apt repository:

# apt-add-repository {{repository_spec}}

2. Remove an apt repository:

# apt-add-repository --remove {{repository_spec}}

3. Update the package cache after adding a repository:

# apt-add-repository --update {{repository_spec}}

4. Enable source packages:

# apt-add-repository --enable-source {{repository_spec}}

Filed Under: Linux

Some more articles you might also be interested in …

  1. setsebool Command in Linux
  2. How to use wget to download file via proxy
  3. kpartx: command not found
  4. b2sum Command Examples (Calculate BLAKE2 cryptographic checksums)
  5. lnav: command not found
  6. tc: command not found
  7. CentOS / RHEL : How to add Physical Volume (PV) to a Volume group (VG) in LVM
  8. ubuntu-drivers: command not found
  9. coredumpctl: command not found
  10. gyb Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright