Check package availability in the repository of a GNU/Linux’s distribution from the command-line
You can check whether a package (programme) is available in the repository of a GNU/Linux distribution by running:
$ apt-cache search <keyword>
where the keyword can be the name of the programme, the package name, part of a package name or any words used in its description.
The standard output of the command (i.e. the list of result) may be quite long. To facilitate going through the list, you can pipe the output to the programme less i.e.
$ apt-cache search <keyword> | less. Then you can use keys
j to go up or down one line;
q to quit less.
More about the
search option from
search performs a full text search on all available package lists for the POSIX regex pattern given, see regex(7). It searches the package names and the descriptions for an occurrence of the regular expression and prints out the package name and the short description, including virtual package names. If –full is given then output identical to show is produced for each matched package, and if –names-only is given then the long description is not searched, only the package name and provided packages are. Separate arguments can be used to specify multiple search patterns that are and’ed together.
If you would like to find out more about
apt-cache or see more options, run:
$ man apt-cache
command-line interface (cli) gnu linux trisquel personal computing apt