Ubuntu – How to get list of installable packages from repositories


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?

Best Answer

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.