LinuxQuestions.org
Visit Jeremy's Blog.
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
Posts: 448

Rep: Reputation: 32
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,026

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
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
Distribution: OpenBSD, FreeBSD
Posts: 1,236

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
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: Hanover, Germany
Distribution: Gentoo
Posts: 15,438
Blog Entries: 2

Rep: Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001
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
Posts: 448

Original Poster
Rep: Reputation: 32
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,026

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
"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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration