In this article you will see how to search the available packages from your Ubuntu repositories and how to get details of the available versions, dependencies and all other information in Ubuntu. Try all these commands and find the difference. And if anything missing, then write down in the comment box.
Search for available packages in Ubuntu:
List all available packages:
apt-cache pkgnames
Search a particular package.Here you can replace the “PACKAGENAME” with your actual real package name.
apt-cache search PACKAGENAME
Example:
apt-cache search firefox
Package Name and Description of Software:
apt-cache pkgnames firefox
Check Dependencies for Specific Packages:
apt-cache showpkg firefox
apt search: Search the provided Package name string in name and description of the packages
apt search PACKAGENAME
Example:
To find the firefox name in all available packages, use below command.
apt search firefox
Search for package names only.
apt search --names-only firefox
apt show: Get the detailed information on a package
apt show PACKAGENAME
Example:
apt show firefox