Stefan Langenmaier
1 year
Claus-Theodor Riegg
6 years
Andreas Vöst
1 year

HowTo: List packages in an apt repository

Updated . Posted . Visible to the public.

When you're using a third party repository on your Ubuntu or Debian system and need to find out which packages are available in this repo and which versions, you can consult the local apt cache.

In /var/lib/apt/lists you'll find a lot of *_Packages files that list the contents of apt repositories. Most repositories will have one file for the i386 architecture and one for the amd64 architecture. Make sure to pick the correct one.

To list the contents of the repository, view the respective files or, for a short summary:

/var/lib/apt/lists $ grep -E "(Package|Version)" ppa.launchpadcontent.net_git-core_ppa_ubuntu_dists_jammy_main_binary-amd64_Packages | paste - - | column -t
Package:  git                  Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  git-all              Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  git-cvs              Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  git-daemon-run       Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  git-daemon-sysvinit  Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  git-doc              Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  git-email            Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  git-gui              Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  git-man              Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  git-mediawiki        Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  git-svn              Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  gitk                 Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Package:  gitweb               Version:  1:2.41.0-0ppa1~ubuntu22.04.1
Emma Heinle
Last edit
Emma Heinle
License
Source code in this card is licensed under the MIT License.