[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to 'apt-cache search'&'apt-file search' by distribut



David Clymer wrote:
On Sun, 2004-04-18 at 13:57, users@linuxforums.org wrote:

What arguement should I use with 'apt-cache search' and 'apt-file
search' to specific the distribution?

Eg. If I want to search for source packages (or normal packages) in
unstable distribution, what would the complete command for 'apt-cache
search' and 'apt-file search'?

AFAIK, you cant restrict your apt-cache search by branch. I think it
just searches all package lists fetched from the sources in your
/etc/apt/sources.list. However, if you know the package name, you can
use apt-cache policy <package name> to see a list of all available
packages (from all branches) with the specified name along with their
versions, apt-get sources, and installation status.

aptitude allows you to do this. Used as a command line tool (rather than in curses-gui mode) I find it to be a welcome improvement over apt-get for most uses.

Following is a simple form to do what you want:

'aptitude search ~Astable~n<search-term>'

or, 'aptitude search ~Astable~d<search-term>'

~A<archive-to-search>
~n<term-in-name>
~d<term-in-description>

Read /usr/share/doc/aptitude/README for the full list of available search modifiers.

dircha



Reply to: