I can get a list of all available packages and their details using the following command:
apt-cache search .
Which outputs a list of packages which looks like this:
i 0ad - Real-time strategy game of ancient warfare
i 0ad-data - Real-time strategy game of ancient warfare (data files)
i 0ad-data-common - Real-time strategy game of ancient warfare (common data files)
p 0ad-dbg - Real-time strategy game of ancient warfare (debug)
p 0xffff - Open Free Fiasco Firmware Flasher
p 2ping - Ping utility to determine directional packet loss
p 2vcard - perl script to convert an addressbook to VCARD file format
p 3270-common - Common files for IBM 3270 emulators and pr3287
p 389-admin - 389 Directory Administration Server
...
How can I get such a list of packages for a version of Ubuntu which I don't have installed?
So, specifically, where can I download the database of all available packages for a specific version of Ubuntu, and how do I get the details (Possibly including version, size, long description...) from it, in plaintext or in a format which is easy to parse with a script?
1. On-line
I prefer use of http://packages.ubuntu.com/ as muru's answer
2. Off-line, Manual
Otherwise looking for an off-line solution then you should be MR. APT and start downloading them from http://archive.ubuntu.com/ubuntu/dists/.
Results:
3. Off-line, using apt-cache/overlay-filesystem/chroot
Going bad, advanced setup:
Actually, I'm going to use a custom
sources.list*
with sameapt-cache
installed on 16.04, butapt
will not overwrite the 16.04 real lists files in/var/lib/apt/lists/
, changes will go to theoverlay
file-system.Setup:
Use: (you may prepare a script)
Use chdist. This command allows you to run
apt-get
andapt-cache
as usual, but for a different release of Ubuntu (or Debian or in fact any other Debian-derived distribution).It also provides a wrapper around grep-dctrl which easily allows you to search and report on metadata fields.
You already have the command to list all possible posted, but ok lets go a bit deeper shall we? So
apt-cache search .
orapt-cache search ''
output around 2300+ lines which is in fact the whole amount of all possible packages including different DE versions.To make it more easy you could only get the names with:
Or is you like more information and dont mind a long long list you could roll that through
apt-cache policy
: