How do I apt-get list available packages?

I run apt-get list but it is not listing packages. How can I list and search for available packages from the command-line? What command do I type?

Try apt command.

Listing installed packages

apt list --installed

To list all packages

apt list
apt list | grep keyword 
apt list | grep nginx

Searching for a particular package by name and short description

Again, apt will help

apt search keyword
apt search firefox
apt search firefox | more
apt search firefox | grep browser 
1 Like

Use the apt-cache when you need to search packages on your Debian or Ubuntu or apt-get based Linux distros

apt-cache search "search-term"
apt-cache search "database"
apt-cache search .  | grep -i 'something'

apt-get list all available packages

There is not apt-get command but you can run the following

apt-cache search . 
apt-cache search .  | less
apt-cache search .  | grep -i 'something'

Do check my tutorial page:

1 Like

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki