LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-25-2013, 06:19 AM   #1
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Rep: Reputation: 35
Question Listing uninstalled package names with a given pattern?


Hello

I often need to query the repositories to find if a given application is available.

But "apt-file list | grep -i myapp" returns so many hits that it's useless.

For instance, how would I be able to find the name of the OpenSSHd server for Debian, without also getting all the libraries that have "ssh" in them?

Thank you.
-------
Edit: "apt-cache search myapp" doesn't work either, as "apt-cache search ssh" returned items like "weirdx - X server in Java".

------
Edit: This seems to do the job: "apt-cache search ssh | grep ssh"

Last edited by littlebigman; 03-25-2013 at 07:14 AM.
 
Old 03-25-2013, 07:22 AM   #2
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
Try apt-cache search <app> , don't forget to update the list first with apt-get update.

Regards
 
Old 03-25-2013, 08:51 AM   #3
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Or you may prefer the results/layout of:

Code:
$ aptitude search foo
 
1 members found this post helpful.
Old 03-25-2013, 09:04 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Code:
apt-cache -n search NAME
will only give packages as result that have NAME in the package name.

For more info on options of apt-cache try
Code:
man apt-cache

Last edited by TobiSGD; 03-25-2013 at 09:06 AM.
 
1 members found this post helpful.
Old 04-11-2013, 05:00 AM   #5
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Original Poster
Rep: Reputation: 35
Thanks for the tips.

While "aptitude search foo" does only return applications that have "foo" in their name, "apt-cache -n search foo" also returns those that have "foo" in the description, eg. "dropbear - lightweight SSH2 server and client".
 
Old 04-16-2013, 06:57 AM   #6
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
"foo" means whatever name you want to search for, not "foo", but lets say you want a text editor, so you search for vi or nano or jed and so on.

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
listing within a folder and display success message upon matching pattern nwazsohail Linux - General 5 04-18-2012 03:27 PM
[SOLVED] Listing file names side by side with directory names anon84 Linux - Newbie 3 04-03-2012 10:13 AM
File names listing question Quest ion Programming 4 10-03-2011 07:36 PM
many package uninstalled, I can't seem to upgrade to a higher Kernal culser Debian 12 12-30-2010 03:36 PM
Is there any way to display the full name of package via dpkg -l <package pattern> ? davidas Debian 4 04-07-2004 10:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration