Search available packages

CentOS

yum search httpd

Ubuntu / Debian

apt-cache search apache2

Filter using regexp with grep

Filter packages a bit better using grep. The example below will show only packages that start with httpd and apache2, respectively

CentOS

yum search httpd | grep ^httpd

Ubuntu / Debian

apt-cache search apache2 | grep ^apache2

Sort alphabetically

Simply append

| sort -d

Leave a Reply

Your email address will not be published. Required fields are marked *

Markdown is allowed in comments.