Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using Ubuntu Software Center I can perform a search on an approximate package name and get the matching packages list to select from.

If I work on a remote machine via ssh (i.e. command line only), how do I perform such a search?

share|improve this question
up vote 5 down vote accepted

Several options here.

  • apt-cache, which will search in descriptions too, by default:

    # keywords or regular expressions
    apt-cache search keyword1 keyword2
    
    # same, but limits to name of package
    apt-cache search --names-only packagename
    
    # shows versions available from each repo
    apt-cache policy packagename
    
  • aptitude:

    aptitude search packagename
    

    aptitude has known issues using Multiarch currently, but searching should work though. LP bug #831768

  • dpkg:

    dpkg -l | grep keyword # inefficient because of useless use of grep
    
    dpkg -l pattern-of-packagename
    
  • Online: packages.ubuntu.com

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.