Searchex (Search Extended) is a yum plugin heavily inspired by Debian's aptitude command that allows a flexible search of packages.
yum searchex <pattern>+ <pattern>+ ...
Where each pattern is a concatenation of one or more search expressions.
A search expression is an expression used to search packages. It's format is
~[+|-]<where><what>
.
where is where to search the package. There are two kind of parameters: those that require the what parameter, and those that do not have such parameter.
The possible values for those that do not require a parameter are:
- a: get the available but not installed packages
- i: get the installed packages
- o: get the obsolete packages
- r: get the recent packages
- u: get the update packages
On the other hand, the possible values for those that require the what parameter are:
- d: get the packages that contains what in their description or summary
- n: get the packages that contain what in their name
- R: get the packages belonging to what repository
- s: get the packages that contains what in their summary
The where parameter can be omitted; in this case it is assumed that the n parameter is used.
+ and - options keeps or inverts the results of the search expression. A + keeps the result, while a - inverts it. If omitted, it is assumed +.
As there are parameters that are optional, usually there are several ways of performing the same search. We will show several of them per each type of search.
- Search all packages that are named glib:
yum searchex ~+nglib
yum searchex ~nglib
yum searchex glib
- Search all packages containing KDE in their description:
yum searchex ~dKDE
- Search packages not installed that contain gcc in their name:
yum searchex ~agcc
yum searchex ~a~ngcc
yum searchex ~-igcc
yum searchex ~-i~ngcc
- Search packages not installed that contain python in their name and PIP in the description:
yum searchex ~a~npython~dPIP
yum searchex ~apython~dPIP
yum searchex ~-ipython~dPIP
yum searchex python~a~dPIP
- Search all packages that matches any of the previous examples:
yum searchex glib ~dKDE ~agcc ~apython~dPIP
Copy searchex.conf
into /etc/yum/pluginconf.d
.
Copy searchex.py
into /usr/lib/yum-plugins
.