• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to List Installed Repositories on Ubuntu & Debian

Written by Admin, Updated On December 19, 2020
debian, repository, ubuntu
How to List Installed Repositories In Ubuntu & Debian

In Linux, a collection of packages knowns as repository. You can make a common repository with the actual package and connect your other systems with this central repository. After that you can install and update packages from there. In this tutorial, we will show you how to list all installed repositories on Ubuntu and Debian based systems.

All Debian based systems like Ubuntu, etc. are using the APT as package manager. You can find the configuration files of Apt at the /etc/apt directory.

List Installed Repositories In Ubuntu#

The /etc/apt/sources.list file contains the references of the remote repositories and files are stored at /etc/apt/sources.list.d/ directory.

To list all the configured repositories on apt, you would run the following command:

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

It will show the output something like this:

deb http://mirrors.digitalocean.com/ubuntu/ bionic main restricted
deb http://mirrors.digitalocean.com/ubuntu/ bionic-updates main restricted
deb http://mirrors.digitalocean.com/ubuntu/ bionic universe
deb http://mirrors.digitalocean.com/ubuntu/ bionic-updates universe
deb http://mirrors.digitalocean.com/ubuntu/ bionic multiverse
deb http://mirrors.digitalocean.com/ubuntu/ bionic-updates multiverse
deb http://mirrors.digitalocean.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
deb https://repos.insights.digitalocean.com/apt/do-agent main main
deb http://ppa.launchpad.net/certbot/certbot/ubuntu bionic main
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://archive.ubuntu.com/ubuntu/ bionic universe
deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted
deb http://security.ubuntu.com/ubuntu/ bionic-security universe
deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse

Another way is use apt-cache command to list all repositories. There is nothing difference but this command will provide information in details.

Run the below command:

sudo apt-cache policy 
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     release o=. main,a=main,n=main,l=. main,c=main,b=amd64
     origin repos.insights.digitalocean.com
 500 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 Packages
     release v=18.04,o=LP-PPA-certbot-certbot,a=bionic,n=bionic,l=Certbot PPA,c=main,b=amd64
     origin ppa.launchpad.net
 500 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic-security,n=bionic,l=Ubuntu,c=multiverse,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic-security,n=bionic,l=Ubuntu,c=universe,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic-security,n=bionic,l=Ubuntu,c=restricted,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic-security,n=bionic,l=Ubuntu,c=main,b=amd64
     origin security.ubuntu.com
 100 http://mirrors.digitalocean.com/ubuntu bionic-backports/universe amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic-backports,n=bionic,l=Ubuntu,c=universe,b=amd64
     origin mirrors.digitalocean.com
 100 http://mirrors.digitalocean.com/ubuntu bionic-backports/main amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic-backports,n=bionic,l=Ubuntu,c=main,b=amd64
     origin mirrors.digitalocean.com
 500 http://mirrors.digitalocean.com/ubuntu bionic-updates/multiverse amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic-updates,n=bionic,l=Ubuntu,c=multiverse,b=amd64
     origin mirrors.digitalocean.com
 500 http://mirrors.digitalocean.com/ubuntu bionic-updates/universe amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic-updates,n=bionic,l=Ubuntu,c=universe,b=amd64
     origin mirrors.digitalocean.com
 500 http://mirrors.digitalocean.com/ubuntu bionic-updates/restricted amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic-updates,n=bionic,l=Ubuntu,c=restricted,b=amd64
     origin mirrors.digitalocean.com
 500 http://mirrors.digitalocean.com/ubuntu bionic-updates/main amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic-updates,n=bionic,l=Ubuntu,c=main,b=amd64
     origin mirrors.digitalocean.com
 500 http://mirrors.digitalocean.com/ubuntu bionic/multiverse amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic,n=bionic,l=Ubuntu,c=multiverse,b=amd64
     origin mirrors.digitalocean.com
 500 http://mirrors.digitalocean.com/ubuntu bionic/universe amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic,n=bionic,l=Ubuntu,c=universe,b=amd64
     origin mirrors.digitalocean.com
 500 http://mirrors.digitalocean.com/ubuntu bionic/restricted amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic,n=bionic,l=Ubuntu,c=restricted,b=amd64
     origin mirrors.digitalocean.com
 500 http://mirrors.digitalocean.com/ubuntu bionic/main amd64 Packages
     release v=18.04,o=Ubuntu,a=bionic,n=bionic,l=Ubuntu,c=main,b=amd64
     origin mirrors.digitalocean.com
Pinned packages:

Conclusion#

I hope you have learned how to get the list of all the repositories configured on Ubuntu or Debian based system.

If you have any questions or feedback, please leave comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install Notepad++ on Ubuntu 20.04
Next Article   How to Install Python 3.9 on Ubuntu 20.04

Related Posts

  • How to Change Hostname Debian 11

    How to Change Hostname on Debian 11

    February 3, 2023
  • How to Install and Use PHP Composer on Ubuntu 22.04

    How to Install Composer on Ubuntu 22.04

    January 31, 2023
  • How to Install Nginx on Ubuntu 22.04

    How to Install Nginx on Ubuntu 22.04

    January 28, 2023

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

  • How to Install SSH Keys on Ubuntu 22.04
    How to Set up SSH Keys on Ubuntu 22.04 January 7, 2023
  • How to Install Mongodb on Debian 11
    How to Install MongoDB on Debian 11 Linux January 11, 2023
  • How to Install Puppet Agent on Ubuntu 22.04
    How to Install Puppet Agent on Ubuntu 22.04 January 22, 2023
  • How to Install Jenkins on Debian 11
    How to Install Jenkins on Debian 11 January 5, 2023
  • How to Change-Hostname Ubuntu 22.04
    How to Change Hostname on Ubuntu 22.04 January 19, 2023
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook