Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

A friend came to me with an Ubuntu question I didn't have a quick one-off answer for, so I present it to SF: How can I list all the packages available from a given apt repository? Example, all the packages in the Canonical partners repo.

share|improve this question
up vote 2 down vote accepted

download the Packages file(s) and pipe it/them through something like:

bzcat Packages.bz2 | egrep '^($|Package:|Version:)'

or, if a simple grep isn't good enough, use grep-dctrl to extract the info you need from the downloaded Packages files.

share|improve this answer

Here's an ugly solution, but its advantage is that it allows you to browse the repository using your favorite tools (aptitude, Synaptic, etc):

  • Make a backup copy of /etc/apt/sources.list;
  • Edit the original sources.list and comment out all the repositories except the one you want to browse;
  • Run your tool's update function and browse away;
  • When done, copy your sources.list.backup over the modified original, and re-run your tool's update function.
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.