The apt-cache command line tool is used for searching apt software package cache. In simple words, this tool is used to search software packages, collects information of packages and also used to search for what available packages are ready for installation on Debian or Ubuntu based systems.
search pkgnames will display package that starts with given keyword
Using “search” with apt-cache will display a list of matched packages with short description.
for eg
apt-cache pkgnames php
all package with php are shown
for eg
apt-cache show netcat