Skip to content

Instantly share code, notes, and snippets.

@abhi-nav
Created November 15, 2018 08:22
Show Gist options
  • Save abhi-nav/9ce9eaf33ef981768f863eff0ca0708a to your computer and use it in GitHub Desktop.
Save abhi-nav/9ce9eaf33ef981768f863eff0ca0708a to your computer and use it in GitHub Desktop.
Using apt-cache for the package

What is apt-cache ?

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.

How Do I List All Available Packages?

apt-cache pkgnames

How do find packagename and description ??

apt-cache pkgnames {keyword}

search pkgnames will display package that starts with given keyword

apt-cache search {packageName}

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

how do i check package information ??

apt-cache show {packageName}

for eg apt-cache show netcat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment