2

I'd like to search for repository packages using package name or package description. For example

  • Search for Zend
  • Search for Ze*d

2 Answers 2

6

You can use either aptitude or apt-cache:

$ apt-cache search zend
php5-apcu - APC User Cache for PHP 5
php-horde-cache - Horde Caching API
php-letodms-lucene - Document management system - Fulltext search
zendframework - powerful PHP framework
zendframework-bin - binary scripts for zendframework
zendframework-resources - resource scripts for zendframework

By default, this will search through a package's description, to search package names only do:

$ apt-cache --names-only search zend
zendframework - powerful PHP framework
zendframework-bin - binary scripts for zendframework
zendframework-resources - resource scripts for zendframework

or

$ aptitude search zend
p   zendframework                   - powerful PHP framework                    
p   zendframework-bin               - binary scripts for zendframework          
p   zendframework-resources         - resource scripts for zendframework        

Both tools accept regular expressions as patterns:

$ apt-cache --names-only search "zend*"
dzen2 - General-purpose messaging and notification program for X11
frozen-bubble - cool game where you pop out the bubbles!
frozen-bubble-data - Data files for Frozen-Bubble game
libbusiness-onlinepayment-authorizenet-perl - AuthorizeNet backend for Business::OnlinePayment
libfile-localizenewlines-perl - Perl module to localize the newlines for one or more files
libzen-dev - ZenLib C++ utility library -- development files
libzen-doc - ZenLib C++ utility library -- documentation
libzen0 - ZenLib C++ utility library -- runtime
zenmap - The Network Mapper Front End
octave-zenity - simple graphical user interfaces using zenity in Octave
ruby-zentest - ZenTest provides 4 different tools: zentest, unit_diff, autotest, and multiruby
ttf-wqy-zenhei - "WenQuanYi Zen Hei" A Hei-Ti Style (sans-serif) Chinese font
zendframework - powerful PHP framework
zendframework-bin - binary scripts for zendframework
zendframework-resources - resource scripts for zendframework
zenity - Display graphical dialog boxes from shell scripts
zenity-common - Display graphical dialog boxes from shell scripts (common files)
mate-dialogs-gnome - Display graphical dialog boxes from shell scripts (GNOME files)


$ aptitude search "zend*"
p   dzen2                 - General-purpose messaging and notification
p   dzen2:i386            - General-purpose messaging and notification
p   frozen-bubble         - cool game where you pop out the bubbles!  
p   frozen-bubble:i386    - cool game where you pop out the bubbles!  
p   frozen-bubble-data    - Data files for Frozen-Bubble game         
p   libbusiness-onlinepayment-autho - AuthorizeNet backend for Business::OnlineP
p   libfile-localizenewlines-perl   - Perl module to localize the newlines for o
p   libzen-dev            - ZenLib C++ utility library -- development 
p   libzen-dev:i386       - ZenLib C++ utility library -- development 
p   libzen-doc            - ZenLib C++ utility library -- documentatio
p   libzen0               - ZenLib C++ utility library -- runtime     
p   libzen0:i386          - ZenLib C++ utility library -- runtime     
p   octave-zenity         - simple graphical user interfaces using zen
p   ruby-zentest          - ZenTest provides 4 different tools: zentes
p   ttf-wqy-zenhei        - "WenQuanYi Zen Hei" A Hei-Ti Style (sans-s
p   zendframework         - powerful PHP framework                    
p   zendframework-bin     - binary scripts for zendframework          
p   zendframework-resources         - resource scripts for zendframework        
i   zenity                - Display graphical dialog boxes from shell 
p   zenity:i386           - Display graphical dialog boxes from shell 
i   zenity-common         - Display graphical dialog boxes from shell 
p   zenmap                - The Network Mapper Front End              
1
  • be sure that those regexps don't match anything in the current directory, or they'll get expanded. better quote them.
    – strugee
    Jan 29, 2014 at 1:01
1

I found the command apt-cache search. I can search for zend using the command

apt-cache search zend
1
  • 1
    Please don't add questions as answers. I deleted the question from your answer. For an online search, see packages.debian.org or packages.ubuntu.org or equivalent for whichever distro you are using.
    – terdon
    Jan 28, 2014 at 20:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .