11

I wanted to install a few packages but had to power down my laptop as I had a few chores to do. I did add the packages' repositories and forgot to install the packages. As my browser history clears on closing, I couldn't recall their names (I'm bad at names).

I would like to know if there is any way I can inquire all available packages (i.e. which I can download or have downloaded) using my repositories?

VedVals
  • 3,471

4 Answers4

9

The command line way of obtaining such a list would be apt-cache:

apt-cache dump # short list
apt-cache dumpavail # long list

This will take some time due to the many packages available.

You can grep Package: by following command:

apt-cache dumpavail | grep "Package:"

My personal approach to view packages I can't remember still is installing and running Synaptic Install synaptic which has a searchable GUI and can also be used to install and purge a given package.

Takkat
  • 142,284
6

It is possible to do it without messing with system configuration :

Target architectures for repositories are available in the InRealease file.

This is especially useful because with some repository management software, you cannot have http access to the repo.

Example with rabbitmq repo

deb https://packagecloud.io/rabbitmq/rabbitmq-server/debian/ stretch main

First, get InRelease file :

wget https://packagecloud.io/rabbitmq/rabbitmq-server/debian/dists/stretch/InRelease

Once you've located what you want in that file (target arch), do the following :

wget -q -O- https://packagecloud.io/rabbitmq/rabbitmq-server/debian/dists/stretch/main/binary-amd64/Packages | grep -E 'Package|Version'
jojo2000
  • 61
  • 1
  • 2
3

If it's in the official repository, you can search or browse all available packages via web: http://packages.ubuntu.com/

All packages for Ubuntu 12.10: http://packages.ubuntu.com/quantal/allpackages

Of course you can run apt-get update and apt-cache search keyword to search for packages if you remember anything related.

If it's a PPA or 3rd party, you'd better check the repo's URL and see the list. For example, Cassandra:

http://www.apache.org/dist/cassandra/debian/dists/11x/main/binary-amd64/

http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/

Terry Wang
  • 9,775
0

if you run or add in your ~/.bashrc file:

. /etc/bash_completion

then you can use name autocompletion for packages the same way as for commands in Bash.

For example: apt-get i first_couple_of_letters_of_package

hitting TAB wil propose the available choices

jet
  • 7,274