Packages and backups

The apt-cache command

Queries the package catalogue without installing anything: search, view details or check the available version.

Syntax

apt-cache search texto | apt-cache show paquete | apt-cache policy paquete

Most useful options

searchSearches packages by text
showShows a package's details
policyShows the installed and candidate version

Copy-ready examples

$ apt-cache search vimSearch packages
$ apt-cache show nginxPackage details

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • It needs the package list updated with apt update.

Related commands

FAQ

How does it differ from apt search?

They are almost the same; apt-cache is the classic, more detailed tool.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course