Number of packages per repository (major distributions)

Solution 1:

  1. pkgs.org gives an approximate but keep in mind that it is showing only binary packages, also architectures do not have same level of support.

    Usually, a source package is built and sliced into multiple deliverables.

    Example Debian is estimated to have 30K source packages, 59K binary packages on pkgs.org.

  2. One way to get exact count without installing any, is by downloading the source packages manifest/index from official repositories/pools or their mirrors. Then pass it through an zgrep|wc -l filter.

    Free distributions like Debian/Ubuntu, Fedora, OpenSuse ... all have public repository with meta.

    Example of:

  • Fedora mirror: https://mirror.aarnet.edu.au/pub/fedora/linux/development/rawhide/Everything/source/tree/repodata/

          Name    Last modified   Size
    
      [ ] 1adc7f7f68727884a1cfdd5ed6a779da153f2943529eab8e22242cafd781473d-other.xml.gz   2022-02-24 18:44    3.6M
      [ ] 4a7e634ca3f6fbfd7af872c5bee66d53040da1a333a7d03f9e4fc81710da194a-other.sqlite.xz    2022-02-24 18:44    4.1M
      [ ] 7fb9cc4420874bbe652d5a8db6e5ffedcbb96cbda355a20a2c012834570ebb15-filelists.xml.gz   2022-02-24 18:44    1.8M
      [TXT]   38e4373598b7d48ea0b348ec5d5e8dacdb50c9aea350ad71bc5df7f94c6f670d-other.xml.zck  2022-02-24 18:44    3.2M
      [ ] 2235c627ffd843ae45a32a1f502c6546e121acb848c9aa83a8e2fa163c3b16fe-primary.xml.gz 2022-02-24 18:44    6.8M
      [TXT]   aa34aca085b179988fe455ed82a6f39b98ac24501b089a24db867d4b13827251-filelists.xml.zck  2022-02-24 18:44    1.8M
      [ ] b5b7b1dd42bc58a7ea7ebbd0a825f77961797d2994c10186b3745253d943e806-filelists.sqlite.xz    2022-02-24 18:44    1.7M
      [TXT]   bc278431b67a343cff3b3794c6a422d4a6a31f9a3bbe34fbe9d8654566334a18-primary.xml.zck    2022-02-24 18:44    6.2M
      [ ] bd645c35a0003ea67175f31e937407cb685941e1269c3a1d47a49a32405d54d1-primary.sqlite.xz  2022-02-24 18:45    8.6M
      [TXT]   repomd.xml  2022-02-24 18:45    4.9K
    
  • Ubuntu mirror: https://mirrors.edge.kernel.org/ubuntu/ubuntu/dists/jammy/

      ../
      by-hash/                                           15-Oct-2021 12:15       -
      main/                                              10-Nov-2021 22:59       -
      multiverse/                                        11-Nov-2021 03:59       -
      restricted/                                        10-Nov-2021 23:13       -
      universe/                                          11-Nov-2021 00:23       -
      Contents-amd64.gz                                  26-Feb-2022 04:57     44M
      Contents-i386.gz                                   26-Feb-2022 05:24     35M
      InRelease                                          26-Feb-2022 15:25    264K
      Release                                            26-Feb-2022 15:25    263K
      Release.gpg                                        26-Feb-2022 15:25     819
    

Solution 2:

Wikipedia keeps the probably most comprehensive and updated list.

Another question is why it would matter to you; package count does not say much in itself, and to the largest part, all the "big" packages are available for all distributions.