Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Distributions»Debian»How to List Installed Repositories In Ubuntu & Debian

    How to List Installed Repositories In Ubuntu & Debian

    RahulBy RahulOctober 5, 20202 Mins Read

    A repository is the collection of packages for a Linux operating system. You can create a central repository containing the actual packages. Then configure your other systems to connect with the main repository. From where, you can install, update packages.

    The Ubuntu and other Debian based systems uses APT (Advanced Packages Tool) as package manager. Apt keeps all the configuration files under /etc/apt directory.

    This tutorial will help you to list all installed repositories under a Ubuntu or Debian based system via command line.

    List Installed Repositories In Ubuntu

    The remote repository references are configured in /etc/apt/sources.list file and all files under /etc/apt/sources.list.d/ directory.

    Use the following command to list all the configured repositories on apt based system:

    sudo grep -rhE ^deb /etc/apt/sources.list* 
    

    You will see the output like below:

    deb http://mirrors.digitalocean.com/ubuntu/ xenial main restricted
    deb-src http://mirrors.digitalocean.com/ubuntu/ xenial main restricted
    deb http://mirrors.digitalocean.com/ubuntu/ xenial-updates main restricted
    deb-src http://mirrors.digitalocean.com/ubuntu/ xenial-updates main restricted
    deb http://mirrors.digitalocean.com/ubuntu/ xenial universe
    deb-src http://mirrors.digitalocean.com/ubuntu/ xenial universe
    .
    .
    .
    deb http://security.ubuntu.com/ubuntu xenial-security universe
    deb-src http://security.ubuntu.com/ubuntu xenial-security universe
    deb http://security.ubuntu.com/ubuntu xenial-security multiverse
    deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
    

    Alternatively, you can use apt-cache command to list all repositories. This command will provide also provide more details about the repository.

    Let’s try below command:

    sudo apt-cache policy 
    

    Output:

    Package files:
     100 /var/lib/dpkg/status
         release a=now
     500 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 Packages
         release v=16.04,o=LP-PPA-ondrej-php,a=xenial,n=xenial,l=***** The main PPA for supported PHP versions with many PECL extensions *****,c=main,b=amd64
         origin ppa.launchpad.net
     500 https://deb.nodesource.com/node_13.x xenial/main amd64 Packages
         release o=Node Source,n=xenial,l=Node Source,c=main,b=amd64
         origin deb.nodesource.com
    .
    .
    .
     500 http://mirrors.digitalocean.com/ubuntu xenial/main amd64 Packages
         release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=main,b=amd64
         origin mirrors.digitalocean.com
    Pinned packages:
    

    Conclusion

    In this tutorial, you have learned to find all the repositories configured on Ubuntu or Debian based system.

    apt debian Repository Ubuntu
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to List All Packages Available in a Repository on Ubuntu
    Next Article How To Install Google Chrome on Ubuntu 20.04

    Related Posts

    Setup Selenium with Python and Chrome on Ubuntu & Debian

    Updated:June 20, 20224 Mins Read

    How to Setup Squid Proxy Server on Ubuntu and Debian

    Updated:June 17, 20225 Mins Read

    Setting Up Environment Variables on Ubuntu

    Updated:May 28, 20222 Mins Read

    How to Install Apache Maven on Ubuntu 22.04

    Updated:June 2, 20223 Mins Read

    Change Screen Resolution of An Ubuntu VM in Hyper-V

    Updated:May 2, 20222 Mins Read

    Download Ubuntu 22.04 – DVD ISO Images

    Updated:May 7, 20222 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How To Install Docker on Ubuntu 22.04
    • How to Install Bower on Ubuntu 22.04 & 20.04
    • How to run “npm start” through Docker
    • Filesystem Hierarchy Structure (FHS) in Linux
    • How to accept user input in Python
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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