Is there a way to see all packages in a package repository
(for example, in deb http://archive.ubuntu.com/ubuntu trusty universe
)?
- In a web browser?
- From command line?
Is there a way to see all packages in a package repository
(for example, in deb http://archive.ubuntu.com/ubuntu trusty universe
)?
APT maintains a list of packages in /var/lib/apt/lists that would be downloaded when asked. The files in the above said folder are generally InRelease files or Release files which contains such information. According to DebianRepository/Format - Debian Wiki:
To download packages from a repository apt would download a InRelease or Release file from the $ARCHIVE_ROOT/dists/$DISTRIBUTION directory.
InRelease files are signed in-line while Release files should have an accompanying Release.gpg file.
The Release file lists the index files for the distribution and their hashes (the index file listed are relative to Release file location).
To download index of the main component apt would scan the Release file for hashes of files in the main directory. eg. http://ftp.cz.debian.org/debian/dists/testing/main/binary-i386/Packages.bz2 which would be listed in http://ftp.cz.debian.org/debian/dists/testing/main/Release as binary-i386/Packages.bz2
If you want to check using terminal or using a locally stored files, open a terminal and run:
cat /var/lib/apt/lists/$ARCHIVE_ROOT_dists_$DISTRIBUTION_$COMPONENT_$ARCHITECTURE_Packages
For example:
cat /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_main_binary-amd64_Packages
Alternatively, if you want to check the packages available using a browser, navigate to the corresponding Packages file generally located in $ARCHIVE_ROOT/dists/$DISTRIBUTION/$COMPONENT/$ARCHITECTURE. For example: http://archive.ubuntu.com/ubuntu/dists/trusty/main/binary-amd64/.
Note: The starting paragraph is an excerpt from my other answer on Can't install MySQL 8 on Ubuntu 19.04.
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages.lz4
and was able to see the full list of packages in the repository.
Also I visited the repository URL you provided in my browser, downloaded Packages.gz
, extracted it and was able to see the full list of packages in that repository.
Thank you for the answer!
– Hirurg103 Feb 14 '20 at 15:22