Debian – How to list available packages in a specific repository on Debian

command linedebianpackage-management

Is it possible to list available packages in a specific repository, one of the repositories configured in apt, on Debian Jessie using the command line?

For example,

deb http://ftp.de.debian.org/debian jessie main non-free

from /etc/apt/sources.list.

Best Answer

Given that the repository you're interested in is in your apt sources, you can find the information on the packages available there in the files apt downloads; for the line

deb http://ftp.de.debian.org/debian jessie main non-free

these would be respectively

  • /var/lib/apt/lists/ftp.de.debian.org_debian_dists_jessie_main_binary-amd64_Packages
  • /var/lib/apt/lists/ftp.de.debian.org_debian_dists_jessie_non-free_binary-amd64_Packages

(assuming you're on amd64). You can ensure those files are up-to-date first by running

apt-get update
Related Question