Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to see a list of repositories so that I can add them to Ubuntu. How can I acquire such a list. Is there a command I can use?

share|improve this question
up vote 2 down vote accepted

There are two different places in Debian for source list files: Most of the default source listings are in


While a few packages may add their own smaller lists to


To view each of them, you can cat them individually. (like cat /etc/apt/sources.list, or cat /etc/apt/sources.list.d/*)

This is quite a familiar style in debian packaging. For instance apache keeps its common configuration in /etc/apache2/apache2.conf, while several other packages (like phpmyadmin) may add their own smaller configurations in /etc/apache2/conf.d/

share|improve this answer

All the repositories are listed in the .list files in the /etc/apt/sources.list.d/ directory.

share|improve this answer
Thank you! but i want to see them in terminal! which command show them? – Milad Sobhkhiz Jun 30 '12 at 16:14
cd /etc/apt/sources.list.d/ && cat *.list – abhshkdz Jun 30 '12 at 16:17

This command will list them quite clearly and nicely:

for X in /etc/apt/sources.list.d/*; do echo; echo; echo "** $X:"; echo; cat $X; done

(Here's an example of what the output can look like.)

You may also want to list the repositories configured in the master configuration file:

cat /etc/apt/sources.list
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.