0

Is there a way to tell what packages are provided by an /etc/apt/sources.list* entry?

I see that apt-cache policy '*' lists all packages provided by all sources, which could be parsed, but that's... humongous. I suppose one could also look in /var/lib/apt/lists. Anything simpler?

usretc
  • 207
  • 1
  • 6

1 Answers1

0

To get the list of packages provided by main, contrib, non-free, security repositories and components you need to parse the files under /var/lib/apt/lists. E,g:

grep Package: /var/lib/apt/lists/deb.debian.org_debian_dists_buster_contrib_binary-amd64_Package
GAD3R
  • 3,702
  • 2
  • 18
  • 32